Selaa lähdekoodia

路由修改,按开放的功能套餐加载

seyason 4 vuotta sitten
vanhempi
commit
e5244dd544
27 muutettua tiedostoa jossa 465 lisäystä ja 336 poistoa
  1. 1 1
      fhKeeper/formulahousekeeper/inva_4_tivo/index.html
  2. 9 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java
  3. 7 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Company.java
  4. 6 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java
  5. 7 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java
  6. 89 86
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  7. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CompanyMapper.xml
  8. 6 5
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  9. 11 12
      fhKeeper/formulahousekeeper/timesheet/config/index.js
  10. 72 3
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/demo_index.html
  11. 15 3
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.css
  12. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.js
  13. 21 0
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.json
  14. BIN
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.ttf
  15. BIN
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.woff
  16. BIN
      fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.woff2
  17. 9 1
      fhKeeper/formulahousekeeper/timesheet/src/main.js
  18. 39 58
      fhKeeper/formulahousekeeper/timesheet/src/routes.js
  19. 47 45
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue
  20. 7 7
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  21. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  22. 18 47
      fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue
  23. 44 44
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  24. 2 2
      fhKeeper/formulahousekeeper/timesheet_h5/src/main.js
  25. 46 9
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue
  26. 1 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue
  27. 3 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue

+ 1 - 1
fhKeeper/formulahousekeeper/inva_4_tivo/index.html

@@ -224,7 +224,7 @@
                         </div>
                         <div class="scenes-body">
                             <img class="img-fluid" src="images/pic_1.png" alt="alternative">
-                            <p>实现远程办公,兼职人员每日上报工作内容和花费时间,雇佣者审核确认后发放薪资</p>
+                            <p>兼职人员远程上报工作时间和内容,雇佣者确认后发放薪资</p>
                         </div>
                     </div>
                     <div class="scenes card">

+ 9 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -86,7 +86,8 @@ public class ReportController {
                                   Integer[] reportTimeType,
                                   String[] createDate,
                                   Integer[] taskId,
-                                  Integer[] isOvertime) {
+                                  Integer[] isOvertime,
+                                  Integer[] progress) {
         List<Report> reportList = new ArrayList<>();
         String token = request.getHeader("Token");
         BigDecimal hourCost = userService.getById(token).getCost();
@@ -110,6 +111,9 @@ public class ReportController {
                 if (isOvertime != null && isOvertime[i] != null) {
                     report.setIsOvertime(isOvertime[i]);
                 }
+                if (progress != null && progress[i] != null) {
+                    report.setProgress(progress[i]);
+                }
                 if (report.getReportTimeType() == 0) {
                     report.setWorkingTime(workingTime[i])
                             .setCost(hourCost.multiply(new BigDecimal(workingTime[i])))
@@ -129,6 +133,10 @@ public class ReportController {
                     } catch (ParseException e) {
                         e.printStackTrace();
                     }
+                } else if (report.getReportTimeType() == 3) {
+                    //计算时长
+                    report.setWorkingTime(workingTime[i])
+                            .setCost(hourCost.multiply(new BigDecimal(workingTime[i])));
                 }
                 reportList.add(report);
                 /*后续需要加入状态*/

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Company.java

@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2021-04-19
+ * @since 2021-05-27
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -85,6 +85,12 @@ public class Company extends Model<Company> {
     @TableField("package_etimecard")
     private Integer packageEtimecard;
 
+    /**
+     * 费用报销
+     */
+    @TableField("package_expense")
+    private Integer packageExpense;
+
 
     @Override
     protected Serializable pkVal() {

+ 6 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java

@@ -122,37 +122,37 @@ public class Project extends Model<Project> {
      * 基线总成本:单位元
      */
     @TableField("budget")
-    private Integer budget;
+    private Integer budget = 0;
 
     /**
      * 人员成本:单位元
      */
     @TableField("base_man")
-    private Integer baseMan;
+    private Integer baseMan = 0;
 
     /**
      * 外包费用
      */
     @TableField("base_outsourcing")
-    private Integer baseOutsourcing;
+    private Integer baseOutsourcing = 0;
 
     /**
      * 风险预留资金1
      */
     @TableField("base_risk1")
-    private Integer baseRisk1;
+    private Integer baseRisk1 = 0;
 
     /**
      * 风险预留资金1
      */
     @TableField("base_risk2")
-    private Integer baseRisk2;
+    private Integer baseRisk2 = 0;
 
     /**
      * 基线费用
      */
     @TableField("base_fee")
-    private Integer baseFee;
+    private Integer baseFee = 0;
 
 
     @TableField(exist = false)

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Report.java

@@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
  * </p>
  *
  * @author Seyason
- * @since 2021-05-09
+ * @since 2021-05-26
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -125,6 +125,12 @@ public class Report extends Model<Report> {
     @TableField("is_overtime")
     private Integer isOvertime;
 
+    /**
+     * 用时占比
+     */
+    @TableField("progress")
+    private Integer progress;
+
 
     @TableField(exist = false)
     private List<SubProject> subProjectList;

+ 89 - 86
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -162,119 +162,122 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                    Integer budget,
                                    HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
-        try {
-            User user = userMapper.selectById(request.getHeader("Token"));
-            Integer companyId = user.getCompanyId();
-            if (id == null) {
-                //新增项目
-                if (name == null) {
-                    httpRespMsg.setError("请填写项目名称");
-                } else {
-                    //检查项目编号不能重复
-                    Integer count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code));
-                    if (count > 0) {
-                        httpRespMsg.setError("提交失败:项目编号已存在");
-                    } else {
-                        Project project = new Project().setProjectName(name).setCompanyId(companyId).setProjectCode(code).setInchargerId(inchargerId)
-                                .setLevel(level)
-                                .setCreatorId(user.getId())
-                                .setCreatorName(user.getName())
-                                .setCreateDate(LocalDate.now())
-                                .setContractAmount(contractAmount)
-                                .setBudget(budget)
-                                .setBaseFee(baseFee)
-                                .setBaseMan(baseMan)
-                                .setBaseOutsourcing(baseOutsourcing)
-                                .setBaseRisk1(baseRisk1)
-                                .setBaseRisk2(baseRisk2);
-                        if (!StringUtils.isEmpty(planStartDate)) {
-                            project.setPlanStartDate(LocalDate.parse(planStartDate));
-                        }
-                        if (!StringUtils.isEmpty(planEndDate)) {
-                            project.setPlanEndDate(LocalDate.parse(planEndDate));
-                        }
-                        if (projectMapper.insert(project) == 0) {
-                            httpRespMsg.setError("操作失败");
-                        } else {
-                            //创建项目涉及到基线成本数据,要填写到快照表中
-                            EarningSnapshot snapshot = new EarningSnapshot();
-                            snapshot.setProjectId(project.getId());
-                            snapshot.setContractAmount(project.getContractAmount());
-                            snapshot.setBaseMan(project.getBaseMan());
-                            snapshot.setBaseOutsourcing(project.getBaseOutsourcing());
-                            snapshot.setBaseFee(project.getBaseFee());
-                            snapshot.setBaseRisk1(project.getBaseRisk1());
-                            snapshot.setBaseRisk2(project.getBaseRisk2());
-                            snapshot.setCreatorId(user.getId());
-                            snapshot.setCreatorName(user.getName());
-
-                            if (project.getContractAmount() == null || project.getContractAmount() == 0 ) {
-                                //无需处理
-                            } else {
-                                int total = project.getBaseFee()+project.getBaseMan()+project.getBaseOutsourcing()+project.getBaseRisk1()+project.getBaseRisk2();
-                                snapshot.setProfitA(100.0*(project.getContractAmount() - total)/project.getContractAmount());
-                                snapshot.setProfitB(100.0*(project.getContractAmount() - total-project.getBaseRisk1())/project.getContractAmount());
-                                snapshot.setProfitC(100.0*(project.getContractAmount() - total-project.getBaseRisk1() - project.getBaseRisk2())/project.getContractAmount());
-                                earningSnapshotMapper.insert(snapshot);
-                            }
-                        }
-                        id = project.getId();
-                    }
-                }
+        User user = userMapper.selectById(request.getHeader("Token"));
+        Integer companyId = user.getCompanyId();
+        if (id == null) {
+            //新增项目
+            if (name == null) {
+                httpRespMsg.setError("请填写项目名称");
             } else {
-                //修改项目
                 //检查项目编号不能重复
-                Integer count = 0;
-                if (code != null) {
-                    count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code).ne("id", id));
-                }
-
+                Integer count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code));
                 if (count > 0) {
                     httpRespMsg.setError("提交失败:项目编号已存在");
                 } else {
-                    Project p = new Project();
-                    p.setProjectName(name).setId(id).setCompanyId(companyId).setProjectCode(code).setInchargerId(inchargerId)
+                    Project project = new Project().setProjectName(name).setCompanyId(companyId).setProjectCode(code).setInchargerId(inchargerId)
                             .setLevel(level)
+                            .setCreatorId(user.getId())
+                            .setCreatorName(user.getName())
+                            .setCreateDate(LocalDate.now())
                             .setContractAmount(contractAmount)
                             .setBudget(budget)
                             .setBaseFee(baseFee)
                             .setBaseMan(baseMan)
                             .setBaseOutsourcing(baseOutsourcing)
                             .setBaseRisk1(baseRisk1)
-                            .setBaseRisk2(baseRisk2);;
+                            .setBaseRisk2(baseRisk2);
                     if (!StringUtils.isEmpty(planStartDate)) {
-                        p.setPlanStartDate(LocalDate.parse(planStartDate));
+                        project.setPlanStartDate(LocalDate.parse(planStartDate));
                     }
                     if (!StringUtils.isEmpty(planEndDate)) {
-                        p.setPlanEndDate(LocalDate.parse(planEndDate));
+                        project.setPlanEndDate(LocalDate.parse(planEndDate));
                     }
-                    if (projectMapper.updateById(p) == 0) {
+                    if (projectMapper.insert(project) == 0) {
                         httpRespMsg.setError("操作失败");
                     } else {
-                        //修改项目相关表
-                        ProjectTimer timer = new ProjectTimer();
-                        timer.setProjectName(name);
-                        projectTimerMapper.update(timer, new QueryWrapper<ProjectTimer>().eq("project_id", id));
+                        //创建项目涉及到基线成本数据,要填写到快照表中
+                        EarningSnapshot snapshot = new EarningSnapshot();
+                        snapshot.setProjectId(project.getId());
+                        snapshot.setContractAmount(project.getContractAmount());
+                        snapshot.setBaseMan(project.getBaseMan());
+                        snapshot.setBaseOutsourcing(project.getBaseOutsourcing());
+                        snapshot.setBaseFee(project.getBaseFee());
+                        snapshot.setBaseRisk1(project.getBaseRisk1());
+                        snapshot.setBaseRisk2(project.getBaseRisk2());
+                        snapshot.setCreatorId(user.getId());
+                        snapshot.setCreatorName(user.getName());
+
+                        if (project.getContractAmount() == null || project.getContractAmount() == 0 ) {
+                            //无需处理
+                        } else {
+                            int bf = getNotNullInt(project.getBaseFee());
+                            int bm = getNotNullInt(project.getBaseMan());
+                            int bos = getNotNullInt(project.getBaseOutsourcing());
+                            int br1 = getNotNullInt(project.getBaseRisk1());
+                            int br2 = getNotNullInt(project.getBaseRisk2());
+                            int total = bf + +bm + bos +br1 + br2;
+                            snapshot.setProfitA(100.0*(project.getContractAmount() - total)/project.getContractAmount());
+                            snapshot.setProfitB(100.0*(project.getContractAmount() - total-br1)/project.getContractAmount());
+                            snapshot.setProfitC(100.0*(project.getContractAmount() - total-br1 - br2)/project.getContractAmount());
+                            earningSnapshotMapper.insert(snapshot);
+                        }
                     }
+                    id = project.getId();
                 }
             }
-            if (httpRespMsg.code.equals("ok")) {
-                //编辑关系
-                participationMapper.delete(new QueryWrapper<Participation>().eq("project_id", id));
-                if (userIds != null) {
-                    for (String userId : userIds) {
-                        participationMapper.insert(new Participation().setProjectId(id).setUserId(userId));
-                    }
+        } else {
+            //修改项目
+            //检查项目编号不能重复
+            Integer count = 0;
+            if (code != null) {
+                count = projectMapper.selectCount(new QueryWrapper<Project>().eq("company_id", companyId).eq("project_code", code).ne("id", id));
+            }
+
+            if (count > 0) {
+                httpRespMsg.setError("提交失败:项目编号已存在");
+            } else {
+                Project p = new Project();
+                p.setProjectName(name).setId(id).setCompanyId(companyId).setProjectCode(code).setInchargerId(inchargerId)
+                        .setLevel(level)
+                        .setContractAmount(contractAmount)
+                        .setBudget(budget)
+                        .setBaseFee(baseFee)
+                        .setBaseMan(baseMan)
+                        .setBaseOutsourcing(baseOutsourcing)
+                        .setBaseRisk1(baseRisk1)
+                        .setBaseRisk2(baseRisk2);;
+                if (!StringUtils.isEmpty(planStartDate)) {
+                    p.setPlanStartDate(LocalDate.parse(planStartDate));
+                }
+                if (!StringUtils.isEmpty(planEndDate)) {
+                    p.setPlanEndDate(LocalDate.parse(planEndDate));
+                }
+                if (projectMapper.updateById(p) == 0) {
+                    httpRespMsg.setError("操作失败");
+                } else {
+                    //修改项目相关表
+                    ProjectTimer timer = new ProjectTimer();
+                    timer.setProjectName(name);
+                    projectTimerMapper.update(timer, new QueryWrapper<ProjectTimer>().eq("project_id", id));
+                }
+            }
+        }
+        if (httpRespMsg.code.equals("ok")) {
+            //编辑关系
+            participationMapper.delete(new QueryWrapper<Participation>().eq("project_id", id));
+            if (userIds != null) {
+                for (String userId : userIds) {
+                    participationMapper.insert(new Participation().setProjectId(id).setUserId(userId));
                 }
             }
-        } catch (NullPointerException e) {
-            e.printStackTrace();
-            httpRespMsg.setError("验证失败");
-            return httpRespMsg;
         }
         return httpRespMsg;
     }
 
+    private int getNotNullInt(Integer integer) {
+        return integer==null?0:integer.intValue();
+    }
+
     //删除项目
     @Override
     public HttpRespMsg deleteProject(Integer id) {

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/CompanyMapper.xml

@@ -14,11 +14,12 @@
         <result column="package_contract" property="packageContract" />
         <result column="package_oa" property="packageOa" />
         <result column="package_etimecard" property="packageEtimecard" />
+        <result column="package_expense" property="packageExpense" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, company_name, staff_count_max, expiration_date, set_meal, package_worktime, package_project, package_contract, package_oa, package_etimecard
+        id, company_name, staff_count_max, expiration_date, set_meal, package_worktime, package_project, package_contract, package_oa, package_etimecard, package_expense
     </sql>
 
 </mapper>

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

@@ -20,17 +20,18 @@
         <result column="sub_project_id" property="subProjectId" />
         <result column="task_id" property="taskId" />
         <result column="is_overtime" property="isOvertime" />
+        <result column="progress" property="progress" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, creator_id, project_id, create_date, working_time, content, state, create_time, time_type, cost, start_time, end_time, report_time_type, sub_project_id, task_id, is_overtime
+        id, creator_id, project_id, create_date, working_time, content, state, create_time, time_type, cost, start_time, end_time, report_time_type, sub_project_id, task_id, is_overtime, progress
     </sql>
     <!--根据日期获取全部报告信息-->
     <select id="getAllReportByDate" resultType="java.util.Map">
         SELECT c.name, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time,
         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.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
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         LEFT JOIN user AS c ON a.creator_id=c.id
@@ -53,7 +54,7 @@
     <select id="getReportByDate" resultType="java.util.Map">
         SELECT a.id, a.project_id as projectId,b.project_name AS project, a.working_time AS time, a.content, 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, b.incharger_id as inchargerId,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime
+        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         left join sub_project as d on d.id = a.sub_project_id
@@ -71,7 +72,7 @@
         SELECT a.id, a.project_id as projectId, b.project_name AS project, a.working_time AS time, a.content, 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, b.incharger_id as inchargerId,
-        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime
+        a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         left join sub_project as d on d.id = a.sub_project_id
@@ -90,7 +91,7 @@
     <!-- 批量获取员工某天的报告 -->
     <select id="getUserReportByDate" resultType="java.util.Map">
         SELECT a.id, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.creator_id as creatorId, 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.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
         FROM report AS a
         JOIN project AS b ON a.project_id=b.id
         left join sub_project as d on d.id = a.sub_project_id

+ 11 - 12
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -1,18 +1,17 @@
 var path = require('path')
 
-//  var ip = '192.168.2.21'
- var ip = '47.100.37.243'
+ //var ip = '127.0.0.1'
 
-//  47.100.37.243
-// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-// for (var i in ifaces) {
-//     for (var j in ifaces[i]) {
-//         var val = ifaces[i][j]
-//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-//             ip = val.address
-//         }
-//     }
-// }
+
+var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+for (var i in ifaces) {
+    for (var j in ifaces[i]) {
+        var val = ifaces[i][j]
+        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+            ip = val.address
+        }
+    }
+}
 
 module.exports = {
   build: {

+ 72 - 3
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/demo_index.html

@@ -54,6 +54,24 @@
       <div class="content unicode" style="display: block;">
           <ul class="icon_lists dib-box">
           
+            <li class="dib">
+              <span class="icon iconfont">&#xe788;</span>
+                <div class="name">报销</div>
+                <div class="code-name">&amp;#xe788;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe644;</span>
+                <div class="name">报销单</div>
+                <div class="code-name">&amp;#xe644;</div>
+              </li>
+          
+            <li class="dib">
+              <span class="icon iconfont">&#xe726;</span>
+                <div class="name">填报</div>
+                <div class="code-name">&amp;#xe726;</div>
+              </li>
+          
             <li class="dib">
               <span class="icon iconfont">&#xe605;</span>
                 <div class="name">记录</div>
@@ -258,9 +276,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1621389362090') format('woff2'),
-       url('iconfont.woff?t=1621389362090') format('woff'),
-       url('iconfont.ttf?t=1621389362090') format('truetype');
+  src: url('iconfont.woff2?t=1621903475590') format('woff2'),
+       url('iconfont.woff?t=1621903475590') format('woff'),
+       url('iconfont.ttf?t=1621903475590') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -286,6 +304,33 @@
       <div class="content font-class">
         <ul class="icon_lists dib-box">
           
+          <li class="dib">
+            <span class="icon iconfont firerock-iconbaoxiao"></span>
+            <div class="name">
+              报销
+            </div>
+            <div class="code-name">.firerock-iconbaoxiao
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont firerock-iconbaoxiaodan"></span>
+            <div class="name">
+              报销单
+            </div>
+            <div class="code-name">.firerock-iconbaoxiaodan
+            </div>
+          </li>
+          
+          <li class="dib">
+            <span class="icon iconfont firerock-icontianbao"></span>
+            <div class="name">
+              填报
+            </div>
+            <div class="code-name">.firerock-icontianbao
+            </div>
+          </li>
+          
           <li class="dib">
             <span class="icon iconfont firerock-iconrecord"></span>
             <div class="name">
@@ -592,6 +637,30 @@
       <div class="content symbol">
           <ul class="icon_lists dib-box">
           
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#firerock-iconbaoxiao"></use>
+                </svg>
+                <div class="name">报销</div>
+                <div class="code-name">#firerock-iconbaoxiao</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#firerock-iconbaoxiaodan"></use>
+                </svg>
+                <div class="name">报销单</div>
+                <div class="code-name">#firerock-iconbaoxiaodan</div>
+            </li>
+          
+            <li class="dib">
+                <svg class="icon svg-icon" aria-hidden="true">
+                  <use xlink:href="#firerock-icontianbao"></use>
+                </svg>
+                <div class="name">填报</div>
+                <div class="code-name">#firerock-icontianbao</div>
+            </li>
+          
             <li class="dib">
                 <svg class="icon svg-icon" aria-hidden="true">
                   <use xlink:href="#firerock-iconrecord"></use>

+ 15 - 3
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 2390497 */
-  src: url('iconfont.woff2?t=1621389362090') format('woff2'),
-       url('iconfont.woff?t=1621389362090') format('woff'),
-       url('iconfont.ttf?t=1621389362090') format('truetype');
+  src: url('iconfont.woff2?t=1621903475590') format('woff2'),
+       url('iconfont.woff?t=1621903475590') format('woff'),
+       url('iconfont.ttf?t=1621903475590') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,18 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.firerock-iconbaoxiao:before {
+  content: "\e788";
+}
+
+.firerock-iconbaoxiaodan:before {
+  content: "\e644";
+}
+
+.firerock-icontianbao:before {
+  content: "\e726";
+}
+
 .firerock-iconrecord:before {
   content: "\e605";
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.js


+ 21 - 0
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.json

@@ -5,6 +5,27 @@
   "css_prefix_text": "firerock-icon",
   "description": "",
   "glyphs": [
+    {
+      "icon_id": "2101853",
+      "name": "报销",
+      "font_class": "baoxiao",
+      "unicode": "e788",
+      "unicode_decimal": 59272
+    },
+    {
+      "icon_id": "5207594",
+      "name": "报销单",
+      "font_class": "baoxiaodan",
+      "unicode": "e644",
+      "unicode_decimal": 58948
+    },
+    {
+      "icon_id": "19236386",
+      "name": "填报",
+      "font_class": "tianbao",
+      "unicode": "e726",
+      "unicode_decimal": 59174
+    },
     {
       "icon_id": "12000587",
       "name": "记录",

BIN
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.ttf


BIN
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.woff


BIN
fhKeeper/formulahousekeeper/timesheet/src/assets/myfont/iconfont.woff2


+ 9 - 1
fhKeeper/formulahousekeeper/timesheet/src/main.js

@@ -37,7 +37,7 @@ import './assets/myfont/iconfont.css'
 // const router = new VueRouter({
 //     routes
 // })
-import { staffRouter, manageRouter, fixedRouter,leaderRouter, projectManageRouter } from './routes'
+import { staffRouter, manageRouter, fixedRouter,leaderRouter, projectManageRouter, expenseRouter,sysManageRouter } from './routes'
 import router from './routes'
 
 import NProgress from 'nprogress'
@@ -72,12 +72,20 @@ router.beforeEach((to, from, next) => {
                     if (user.company.packageProject == 1 && !user.leader) {
                         getRoutes = getRoutes.concat(projectManageRouter);
                     }
+                    if (user.company.packageExpense == 1) {
+                        getRoutes = getRoutes.concat(expenseRouter);
+                    }
                     global.antRouter = fixedRouter.concat(getRoutes);
                     router.addRoutes(fixedRouter.concat(getRoutes));
                     router.options.routes = fixedRouter.concat(getRoutes);
                     router.push({ path: to.path })
                 } else {
                     var getRoutes = baseRoleGetRouters(manageRouter, user);
+                    if (user.company.packageExpense == 1) {
+                        getRoutes = getRoutes.concat(expenseRouter);
+                    }
+                    getRoutes = getRoutes.concat(sysManageRouter);
+                    
                     global.antRouter = fixedRouter.concat(getRoutes);
                     router.addRoutes(fixedRouter.concat(getRoutes));
                     router.options.routes = fixedRouter.concat(getRoutes);

+ 39 - 58
fhKeeper/formulahousekeeper/timesheet/src/routes.js

@@ -102,6 +102,20 @@ export const projectManageRouter = [
         ]
     }
 ];
+export const expenseRouter = [
+    // 费用报销模块
+    {
+        path: '/',
+        component: Home,
+        name: '费用报销',
+        iconCls: 'iconfont firerock-iconbaoxiao',
+        leaf: true,
+        children: [
+            { path: '/expense', component: expense, name: '费用报销' }
+        ]
+    }
+];
+
 export const manageRouter = [
     
     //工时报告
@@ -161,29 +175,7 @@ export const manageRouter = [
         ]
     },
     
-    // 费用报销模块
-    {
-        path: '/',
-        component: Home,
-        name: '费用报销',
-        iconCls: 'iconfont firerock-iconcaiwu',
-        leaf: true,
-        children: [
-            { path: '/expense', component: expense, name: '费用报销' }
-        ]
-    },
     
-    // 权限管理
-    // {
-    //     path: '/',
-    //     component: Home,
-    //     name: '权限管理',
-    //     iconCls: 'iconfont firerock-iconsetting',
-    //     leaf: true,
-    //     children: [
-    //         { path: '/jurisdiction', component: jurisdiction, name: '权限管理' }
-    //     ]
-    // },
 
     //项目管理
     {
@@ -197,42 +189,7 @@ export const manageRouter = [
             { path: '/projectInside/:id', component: projectInside, name: '项目查看' },
         ]
     },
-    //组织架构
-    {
-        path: '/',
-        component: Home,
-        name: '',
-        iconCls: 'fa fa-users',
-        leaf: true,//只有一个节点
-        children: [
-            { path: '/team', component: team, name: '组织架构' },
-        ]
-    },
-    //设置时间类型
-    {
-        
-        path: '/',
-        component: Home,
-        name: '',
-        iconCls: 'iconfont firerock-iconsetting',
-        leaf: true,//只有一个节点
-        children: [
-            { path: '/timetype', component: timetype, name: '系统基础设置' },
-        ]
-    },
-    //智能监控
-    // {
-    //     path: '/',
-    //     component: Home,
-    //     name: '智能监控',
-    //     iconCls: 'fa fa-desktop',
-    //     children: [
-    //         { path: '/desktop', component: desktop, name: '员工桌面' },
-    //         { path: '/desktop/:id/:date', component: desktopDetail, name: '员工桌面详情', hidden: true },
-    //         { path: '/unusual', component: unusual, name: '异常统计' },
-    //         { path: '/statistics', component: statistics, name: '智能分析' },
-    //     ]
-    // },
+
     {
         path: '/404',
         component: NotFound,
@@ -339,6 +296,30 @@ export const leaderRouter = [
     }
 ];
 
+export const sysManageRouter = [//组织架构
+    {
+        path: '/',
+        component: Home,
+        name: '',
+        iconCls: 'fa fa-users',
+        leaf: true,//只有一个节点
+        children: [
+            { path: '/team', component: team, name: '组织架构' },
+        ]
+    },
+    //设置时间类型
+    {
+        
+        path: '/',
+        component: Home,
+        name: '',
+        iconCls: 'iconfont firerock-iconsetting',
+        leaf: true,//只有一个节点
+        children: [
+            { path: '/timetype', component: timetype, name: '系统基础设置' },
+        ]
+    },]
+
 export default new Router({
     routes: fixedRouter
 })

+ 47 - 45
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -1,7 +1,8 @@
 <template>
   <section>
     <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff">
-      <h2><i class="iconfont firerock-iconcaiwu" style="padding-right: 10px"></i>费用报销模块</h2>
+      <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>费用报销模块</h3>
+      <el-divider ></el-divider>
       <el-col :span="12">
         <el-menu
           default-active="1-1"
@@ -13,8 +14,8 @@
           style="width:100%">
           <el-submenu index="1">
             <template slot="title">
-              <i class="el-icon-location"></i>
-              <span>员工费用报</span>
+              <i class="iconfont firerock-icontianbao"></i>
+              <span>员工费用报</span>
             </template>
               <el-menu-item index="1-1"><p @click="ssl(0)"> 一般费用填报</p></el-menu-item>
               <el-menu-item index="1-2"><p @click="ssl(1)">差旅费用填报</p></el-menu-item>
@@ -34,8 +35,8 @@
           active-text-color="#20A0FF"
           style="width:100%">
             <el-menu-item index="2" @select="bills">
-              <i class="el-icon-setting"></i>
-              <span slot="title">我的报销单据</span>
+              <i class="iconfont firerock-iconbaoxiaodan"></i>
+              <span slot="title">报销单据列表</span>
             </el-menu-item>
           </el-menu>
       </el-col>
@@ -94,9 +95,9 @@
         </div>
         <!-- 按钮 -->
         <div class="pu_button">
-          <span class="pu_bu_x" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> 新增填报</span>
-          <span v-if="this.addForm.totalAmount <= 0">总成本 {{this.addForm.totalAmount}} 元</span>
-          <span v-else>总成本 ¥{{this.addForm.totalAmount | numberToCurrency}} 元</span>
+          <span v-if="this.addForm.totalAmount <= 0" style="color:#606266;">总成本 {{this.addForm.totalAmount}} 元</span>
+          <span v-else style="color:#606266;">总成本 ¥{{this.addForm.totalAmount | numberToCurrency}} 元</span>
+          <span class="pu_bu_x" style="margin-left:10px;" @click="addxz"> <i class="el-icon-circle-plus-outline"></i> 新增发票</span>
         </div>
 
         <!-- 表格 -->
@@ -105,23 +106,24 @@
             :data="invoiceList"
             border
             style="width: 100%;height: 100%"
+            max-height="300px"
             @row-dblclick="dbclick">
-            <el-table-column prop="projectName" label="项目" width="180">
+            <el-table-column prop="projectName" label="所属项目" width="180">
               <template slot-scope="scope">
-                <el-select v-model="scope.row.projectId" placeholder="项目" style="width: 150px">
+                <el-select size="small" v-model="scope.row.projectId" placeholder="项目" style="width: 150px" >
                   <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
                 </el-select>
               </template>
             </el-table-column>
             <el-table-column prop="happenDate" label="费用日期" width="170px">
               <template slot-scope="scope">
-                <el-date-picker v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" placeholder="选择日期">
+                <el-date-picker size="small" v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" placeholder="选择日期">
                 </el-date-picker>
               </template>
             </el-table-column>
             <el-table-column label="发票种类" width="175px">
               <template slot-scope="scope">
-                <el-select v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
+                <el-select size="small" v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
                   <el-option label="增值税专用发票" value="0"></el-option>
                   <el-option label="增值税普通发票" value="1"></el-option>
                 </el-select>
@@ -129,33 +131,33 @@
             </el-table-column>
             <el-table-column label="费用金额" width="135px">
               <template slot-scope="scope">
-                <el-input v-enter-number v-model.number="scope.row.amount" @change="shiqu(scope.row.amount)"></el-input>
+                <el-input size="small" v-enter-number v-model.number="scope.row.amount" @change="shiqu(scope.row.amount)"></el-input>
               </template>
             </el-table-column>
             <el-table-column prop="invoiceNo" label="发票号" width="135px">
               <template slot-scope="scope">
-                <el-input v-model.number="scope.row.invoiceNo"></el-input>
+                <el-input size="small" v-model.number="scope.row.invoiceNo"></el-input>
               </template>
             </el-table-column>
             <el-table-column label="税率%" width="135px">
               <template slot-scope="scope">
-                <el-input v-enter-number v-model.number="scope.row.taxPercent"></el-input>
+                <el-input size="small" v-enter-number v-model.number="scope.row.taxPercent"></el-input>
               </template>
             </el-table-column>
             <el-table-column label="税额" width="135px">
               <template slot-scope="scope">
-                <el-input v-enter-number v-model.number="scope.row.taxValue"></el-input>
+                <el-input size="small" v-enter-number v-model.number="scope.row.taxValue"></el-input>
               </template>
             </el-table-column>
             <el-table-column label="备注" width="135px">
               <template slot-scope="scope">
-                <el-input v-model.number="scope.row.remark"></el-input>
+                <el-input size="small" v-model.number="scope.row.remark"></el-input>
               </template>
             </el-table-column>
-            <el-table-column
+            <el-table-column fixed="right"
               label="操作">
               <template slot-scope="scope">
-                <el-button type="danger" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px" @click="chanc(scope.$index)">删除</el-button>
+                <el-button  type="default" size="mini" style="display: inline-block;margin-left:0;margin-top: 3px" @click="chanc(scope.$index)">删除</el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -168,27 +170,27 @@
   <!-- 下面部分 -->
   <div class="xiamian" ref="xiaomian" style="width: 85%;float:right;background: #fff;position: relative;">
       <div v-if="displayTable">
-        <div style="padding:10px;">
+        <div style="padding-left:10px;padding-right:10px;">
           <div>
-          <el-form label-width="80px" inline>
+          <el-form label-width="80px" inline >
             <!-- 填报日期 -->
             <el-form-item label="单据编号" >
-              <el-input v-model="code" placeholder="单据编号" clearable="true"></el-input>
+              <el-input v-model="code" size="small" placeholder="单据编号" clearable="true"></el-input>
             </el-form-item>
             <!-- 填报日期 -->
             <el-form-item label="填报日期" >
-              <el-date-picker type="date" clearable="true" placeholder="选择日期" value-format="yyyy-MM-dd" v-model="date" style="width: 200px;"></el-date-picker>
+              <el-date-picker type="date" size="small" clearable="true" placeholder="选择日期" value-format="yyyy-MM-dd" v-model="date" style="width: 200px;"></el-date-picker>
             </el-form-item>
             <!-- 费用类型 -->
             <el-form-item label="费用类型">
-              <el-select v-model="type" placeholder="请选择费用类型" clearable="true" style="width: 150px">
+              <el-select v-model="type" size="small" placeholder="请选择费用类型" clearable="true" style="width: 150px">
                 <el-option label="一般费用" value="0"></el-option>
                 <el-option label="差旅费用" value="1"></el-option>
                 <el-option label="外包费用" value="2"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item>
-              <el-button @click="getList">查找</el-button>
+              <el-button @click="getList" size="small">查找</el-button>
             </el-form-item>
           </el-form>
         </div>
@@ -196,7 +198,7 @@
         <!--列表-->
           <el-table :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
               <el-table-column prop="code" label="票据编号"></el-table-column>
-              <el-table-column prop="totalAmount" label="金额" ></el-table-column>
+              <el-table-column prop="totalAmount" label="金额(元)" ></el-table-column>
               <el-table-column prop="ownerName" label="填报人" ></el-table-column>
               <el-table-column prop="createDate" label="填报日期" ></el-table-column>
               <el-table-column prop="ticketNum" label="发票张数" ></el-table-column>
@@ -236,7 +238,7 @@
       </div>
   </div>
     <!-- 我的单据报销展示 -->
-      <el-dialog title="提示" :visible.sync="dialog" width="1000px">
+      <el-dialog title="报销单据详情" :visible.sync="dialog" width="1000px">
         <!-- 内容主体 -->
         <div class="informant"><!--  填报人 -->
           <el-form :model="ParticularsList" label-width="80px">
@@ -277,7 +279,7 @@
           <el-table :data="ParticularsList.invoiceList" border style="width: 100%">
             <el-table-column prop="projectId" label="项目" width="155">
                 <template slot-scope="scope">
-                  <el-select v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 130px">
+                  <el-select size="small" v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 130px">
                     <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
                   </el-select>
                   <span v-else>{{projectIdName[scope.$index].projectName}}</span>
@@ -285,47 +287,47 @@
             </el-table-column>
             <el-table-column prop="happenDate" label="费用日期" width="172">
               <template slot-scope="scope">
-                <el-date-picker v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" placeholder="选择日期">
+                <el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px" value-format="yyyy-MM-dd" placeholder="选择日期">
                 </el-date-picker>
                 <span v-else>{{scope.row.happenDate}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="invoiceType" label="发票种类" width="172">
               <template slot-scope="scope">
-                <el-select v-if="!flg" v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
+                <el-select size="small" v-if="!flg" v-model="scope.row.invoiceType" placeholder="请选择费用类型" style="width: 150px;">
                   <el-option label="增值税专用发票" :value="0"></el-option>
                   <el-option label="增值税普通发票" :value="1"></el-option>
                 </el-select>
                 <span v-else>{{typeInvoic[scope.row.invoiceType]}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="amount" label="费用金额" width="172">
+            <el-table-column prop="amount" label="费用金额(元)" width="172">
               <template slot-scope="scope">
-                <el-input v-enter-number v-if="!flg" v-model.number="scope.row.amount" @change="kan"></el-input>
-                <span v-else>{{scope.row.amount}}</span>
+                <el-input size="small" v-enter-number v-if="!flg" v-model.number="scope.row.amount" @change="kan"></el-input>
+                <span v-else>{{scope.row.amount}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="invoiceNo" label="发票号" width="172">
               <template slot-scope="scope">
-                <el-input v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
+                <el-input size="small" v-if="!flg" v-model.number="scope.row.invoiceNo"></el-input>
                 <span v-else>{{scope.row.invoiceNo}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="taxPercent" label="税率%" width="172">
               <template slot-scope="scope">
-                <el-input v-enter-number v-if="!flg" v-model.number="scope.row.taxPercent"></el-input>
+                <el-input size="small" v-enter-number v-if="!flg" v-model.number="scope.row.taxPercent"></el-input>
                 <span v-else>{{scope.row.taxPercent}}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="taxValue" label="税额" width="172">
+            <el-table-column prop="taxValue" label="税额(元)" width="172">
               <template slot-scope="scope">
-                <el-input v-enter-number v-if="!flg" v-model.number="scope.row.taxValue"></el-input>
-                <span v-else>{{scope.row.taxValue}}</span>
+                <el-input size="small" v-enter-number v-if="!flg" v-model.number="scope.row.taxValue"></el-input>
+                <span v-else>{{scope.row.taxValue}}</span>
               </template>
             </el-table-column>
             <el-table-column prop="remark" label="备注" width="300">
               <template slot-scope="scope">
-                <el-input v-if="!flg" v-model.number="scope.row.remark"></el-input>
+                <el-input size="small" v-if="!flg" v-model.number="scope.row.remark"></el-input>
                 <span v-else>{{scope.row.remark}}</span>
               </template>
             </el-table-column>
@@ -747,8 +749,8 @@ export default {
 /* 费用报销标题 */
 .headine {
   width: 100%;
-  height: 70px;
-  line-height: 70px;
+  height: 46.4px;
+  line-height: 46.4px;
   background: #fff;
   box-sizing: border-box;
 }
@@ -756,7 +758,7 @@ export default {
   margin: 0;
   display: inline-block;
   box-sizing: border-box;
-  color: #20A0FF;
+  color: #999;
 }
 .headine p {
   display: inline-block;
@@ -770,12 +772,12 @@ export default {
   z-index: 2;
   top: 0;
 }
-.sidebars h2 {
+.sidebars h3 {
   margin: 0;
   line-height: 45px;
-  background: #20A0FF;
+  background: #ffffff;
   font-weight: normal;
-  color: #fff;
+  color: #666;
   padding-left: 20px;
 }
 .sidebars .el-col-12 {

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

@@ -52,7 +52,7 @@
                     <el-link type="primary" @click="showUser(scope.row.inchargerId)">{{scope.row.inchargerName}}</el-link>
                 </template>
             </el-table-column>
-            <el-table-column prop="participator" label="参与者" sortable>
+            <el-table-column prop="participator" label="参与者" sortable v-if="user.company.packageProject==0">
                 <template slot-scope="scope">
                     <v-for v-for="par in scope.row.participator" :key="par.id" >
                         <el-link style="margin-right:10px;" type="primary" @click="showUser(par.id)">{{par.name}}</el-link>
@@ -123,7 +123,7 @@
                 <!-- 增加合同金额字段 -->
                         <span style="margin-left:63px;margin-right:10px;" v-if="user.company.packageProject==1">合同金额</span>
                         <el-input v-model="addForm.contractAmount" style="width:33%;"
-                        placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
+                        placeholder="整数" clearable  @keyup.native="addForm.contractAmount=addForm.contractAmount.replace(/[^\d]/g,'');" ></el-input><span style="margin-left:10px;">元</span>
                 <!-- 增加合同金额字段 -->   
 
                 </el-form-item>
@@ -154,31 +154,31 @@
             <span class="rg_span">
                 <span style="width:120px;display: inline-block;" v-if="user.company.packageProject==1">人工成本</span>
                 <el-input @input="addUpfun(addForm.baseMan)" v-model="addForm.baseMan" style="width:200px; margin-bottom: 20px"
-                placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
+                placeholder="整数" clearable  @keyup.native="addForm.baseMan=addForm.baseMan.replace(/[^\d]/g,'');"></el-input><span style="margin-left:10px;">元</span>
             </span>
             <!-- 费用 -->
             <span class="rg_span">
                 <span style="width:120px;display: inline-block;" v-if="user.company.packageProject==1">费用</span>
                 <el-input @input="addUpfun(addForm.baseFee)" v-model="addForm.baseFee" style="width:200px;"
-                placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
+                placeholder="整数" clearable  @keyup.native="addForm.baseFee=addForm.baseFee.replace(/[^\d]/g,'');"></el-input><span style="margin-left:10px;">元</span>
             </span>
             <!-- 外包费用 -->
             <div class="rg_span" style="margin-bottom: 20px;">
                 <span style=" width:120px;display: inline-block;" v-if="user.company.packageProject==1">外包费用</span>
                 <el-input @input="addUpfun(addForm.baseOutsourcing)" v-model="addForm.baseOutsourcing" style="width:200px;"
-                placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
+                placeholder="整数" clearable @keyup.native="addForm.baseOutsourcing=addForm.baseOutsourcing.replace(/[^\d]/g,'');"></el-input><span style="margin-left:10px;">元</span>
             </div>
             <!-- 预留风险金额1 -->
             <div style="display: inline-block;" class="rg_span">
                 <span style="width:120px;display: inline-block;text-align: right;" v-if="user.company.packageProject==1">预留风险金额1</span>
                 <el-input @input="addUpfun(addForm.baseRisk1)" v-model="addForm.baseRisk1" style="width:200px;"
-                placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
+                placeholder="整数" clearable @keyup.native="addForm.baseRisk1=addForm.baseRisk1.replace(/[^\d]/g,'');"></el-input><span style="margin-left:10px;">元</span>
             </div>
             <!-- 预留风险金额2 -->
             <div class="rg_span">
                 <span style="width:120px;display: inline-block;text-align: right;" v-if="user.company.packageProject==1">预留风险金额2</span>
                 <el-input @input="addUpfun(addForm.baseRisk2)" v-model="addForm.baseRisk2" style="width:200px;"
-                placeholder="整数" clearable @keyup.native="number"></el-input><span style="margin-left:10px;">元</span>
+                placeholder="整数" clearable @keyup.native="addForm.baseRisk2=addForm.baseRisk2.replace(/[^\d]/g,'');"></el-input><span style="margin-left:10px;">元</span>
             </div>
             <!-- 合计 -->
             <div style="margin-top: 20px">

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

@@ -3,7 +3,7 @@
         <el-tabs v-model="activeName" @tab-click="handleClick">
             <el-tab-pane label="主要内容" name="project" @click="null" disabled=true>
                 <template slot="label">
-                    <el-button type="default" size="mini"  icon="el-icon-arrow-left" @click="toList" style="margin-left:10px;">项目列表</el-button>
+                    <i type="default" size="mini"  class="el-icon-arrow-left" @click="toList" style="margin-left:10px;cursor:pointer;"></i>
                     <el-select v-model="curProjectId"  size="mini" class="projectCls" @change="onProjectChange">
                         <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName" :value="item.id"></el-option>
                     </el-select>
@@ -224,7 +224,7 @@
             <el-tab-pane label="文件中心" name="files"><FileCenter ref="fileCenter"></FileCenter></el-tab-pane>
             <el-tab-pane label="项目概览" name="info"><ProjectInfo ref="projectInfo"></ProjectInfo></el-tab-pane>
             <el-tab-pane label="数据统计" name="summary"><Summary ref="summary"></Summary></el-tab-pane>
-            <el-tab-pane label="挣值分析" name="earning" v-if="user.role > 0 || user.id == project.inchargerId"><Earning ref="earning"></Earning></el-tab-pane>
+            <el-tab-pane label="挣值分析" name="earning" v-if="user.role > 0 || user.id == currentProject.inchargerId"><Earning ref="earning"></Earning></el-tab-pane>
         </el-tabs>
         
         <!--新增任务界面-->

+ 18 - 47
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -119,57 +119,27 @@
                             placeholder="任意时间点">
                         </el-time-picker>
             </div>
+                </div>
+            </el-radio> 
+        </div>
+        </el-col>
 
-            <!-- <div style="width:500px;">
-               开始时间: <el-time-picker
-                    v-model="startTime"
-                    :picker-options="{
-                        start: '08:30',
-                        step: '00:15',
-                        end: '18:30'
-                    }"
-                    placeholder="任意时间点">
-                </el-time-picker>
-            </div>
-            <div style="margin-top:5px;">
-               结束时间: <el-time-picker
-                            v-model="endTime"
-                            :picker-options="{
-                                start: '08:30',
-                                step: '00:15',
-                                end: '18:30',
-                                minTime: startTime
-                            }"
-                            placeholder="任意时间点">
-                        </el-time-picker>
-            </div> -->
-
-            <!-- <div style="width:500px;">
-                开始时间:<el-time-select
-                    placeholder="起始时间"
-                    v-model="startTime"
-                    :picker-options="{
-                    start: '08:30',
-                    step: '00:15',
-                    end: '18:30'
-                    }">
-                </el-time-select>
+        <!--选择按比例分配样式 -->
+        <el-col :span="8">  
+        <div  class="panel" >
+            <el-radio v-model="timeType.type" :label="3">按比例分配时间
+            <div class="sample">
+            <p>
+            展示样例
+            </p>
+            
+            <div style="width:300px;">
+                <el-col span="6">用时占比: </el-col>
+                <el-col span="8"><el-slider v-model="progress" :step="10" style="width:100px;margin-top:-12px;" ></el-slider></el-col>
+                <el-col span="10"><span style="margin-left:10px;float:right;"><span style="margin-right:10px;">{{progress}}%</span>{{(progress*8/100).toFixed(1)}}小时</span></el-col>
             </div>
-            <div style="margin-top:5px;">
-               结束时间:<el-time-select
-                    placeholder="结束时间"
-                    v-model="endTime"
-                    :picker-options="{
-                    start: '08:30',
-                    step: '00:15',
-                    end: '18:30',
-                    minTime: startTime
-                    }">
-                </el-time-select>
-            </div> -->
                 </div>
             </el-radio> 
-            
         </div>
         </el-col>
         </el-row>
@@ -186,6 +156,7 @@
     export default {
         data() {
             return {
+                progress:30,
                 startTime:null,
                 endTime:null,
                 timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.5,13.0,13.5,14.0,14.5,15.0],

+ 44 - 44
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -138,25 +138,23 @@
                 <el-form-item label="工作日期" prop="createDate">
                     <el-date-picker v-model="workForm.createDate" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
                     @change="changeMonth()" :clearable="false" type="date" placeholder="选择工作日期" :disabled="isDisable"></el-date-picker>
+
+                    <span v-if="reportTimeType.type == 3" style="margin-left:30px;" >总时长: {{reportTimeType.allday.toFixed(1)}}小时</span>
                 </el-form-item>
-                <!-- <el-form-item label="待分配时长" prop="name">
-                    <span>{{report.time}}h</span>
-                    <el-link type="primary" :underline="false" @click="addDomain" style="margin-left:40px">添加项目</el-link>
-                </el-form-item> -->
                 
                 <div v-for="(domain, index) in workForm.domains" :key="domain.id">
-                    <el-form-item label="工作时长" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
+                    <el-form-item v-if="reportTimeType.type != 3" label="工作时长" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
                         :rules="{ required: true, message: '请选择工作时长', trigger: 'blur' }">
                         <el-select v-model="domain.timeType" 
-                        v-if="reportTimeType.type == 0"
-                        placeholder="请选择工作时长" 
-                        :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
-                        @change="onTimeTypeChange(domain.timeType)">
-                        <el-option
-                            v-for="item in timeType"
-                            :key="item.value"
-                            :label="item.label"
-                            :value="item.value">
+                            v-if="reportTimeType.type == 0"
+                            placeholder="请选择工作时长" 
+                            :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
+                            @change="onTimeTypeChange(domain.timeType)">
+                            <el-option
+                                v-for="item in timeType"
+                                :key="item.value"
+                                :label="item.label"
+                                :value="item.value">
                             </el-option>
                         </el-select>
                         <!-- 数字时长选择 -->
@@ -196,30 +194,6 @@
                         </el-time-picker>
                         </span>
                         <div class="overtime"><el-checkbox v-model="domain.isOvertime">加班</el-checkbox></div>
-                    <!--  -->
-                        <!-- <el-time-select 
-                        :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
-                            placeholder="起始时间"
-                            style="width:120px;"
-                            v-model="domain.startTime"
-                            :picker-options="{
-                            start: '08:00',
-                            step: '00:30',
-                            end: '23:30'
-                            }">
-                        </el-time-select> - <el-time-select 
-                        :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)"
-                            placeholder="结束时间"
-                            style="width:120px;"
-                            v-model="domain.endTime"
-                            :picker-options="{
-                            start: '08:00',
-                            step: '00:30',
-                            end: '23:30',
-                            minTime: domain.startTime
-                            }">
-                        </el-time-select> -->
-                    <!--  -->
                     </el-form-item>
                     
                     <el-form-item label="投入项目" :prop="'domains.' + index + '.projectId'"
@@ -238,6 +212,16 @@
                             <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
                         </el-link>
                     </el-form-item>
+
+                    <el-form-item v-if="reportTimeType.type == 3" label="用时占比" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
+                        :rules="{ required: true, message: '请选择工作时长', trigger: 'blur' }">
+                        <div style="width:250px;">
+                            <el-col span="14"><el-slider v-model="domain.progress" :min="10" :show-tooltip="false" :step="10" style="width:136px;" @change="domain.workingTime = (reportTimeType.allday*domain.progress/100).toFixed(1)"></el-slider></el-col>
+                            <el-col span="10"><span style="margin-left:10px;float:right;"><span style="margin-right:10px;">{{domain.progress}}%</span>{{domain.workingTime}}小时</span></el-col>
+                        </div>
+                        <div class="overtime"><el-checkbox v-model="domain.isOvertime">加班</el-checkbox></div>
+                    </el-form-item>
+
                     <!--项目管理专业版模式下,项目下的近期执行的任务 -->
                     <el-form-item label="相关任务" :prop="'domains.' + index + '.taskId'" v-if="user.company.packageProject==1">
                         <el-select v-model="domain.taskId" placeholder="请选择" style="width:100%;" 
@@ -281,7 +265,7 @@
     export default {
         data() {
             return {
-                timeFields:['timeType', 'workingTime', 'startTime'],
+                timeFields:['timeType', 'workingTime', 'startTime', 'progress'],
                 subProjectList:[],
                 canEdit: true,
                 timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0],
@@ -933,7 +917,8 @@
                                     startTime: list.report[i].startTime,
                                     // endTime: `Fri May 16 2021 ${list.report[i].endTime}:12 GMT+0800 (中国标准时间)`,
                                     endTime: list.report[i].endTime,
-                                    isOvertime: flg
+                                    isOvertime: flg,
+                                    progress:list.report[i].progress,
                                 })
                                 if (list.report[i].state >= 2) {
                                     this.canEdit = true;
@@ -949,8 +934,9 @@
                                 domains: [{
                                     id: null,
                                     projectId: "",
-                                    workingTime: "",
+                                    workingTime: this.reportTimeType.type==3?(10*this.reportTimeType.allday/100).toFixed(1):"",
                                     content: "",
+                                    progress:10,
                                     state: 2,
                                     timeType:0,
                                 }],
@@ -989,8 +975,9 @@
             addDomain() {
                 this.workForm.domains.push({
                         projectId: "",
-                        workingTime: "",
+                        workingTime: this.reportTimeType.type == 3?(10*this.reportTimeType.allday/100).toFixed(1):"",
                         content: "",
+                        progress:10,
                         state:2,//2-表示待提交
                 });
                 
@@ -1069,6 +1056,17 @@
                                     });
                                 return;
                             }
+                        } else if (this.reportTimeType.type == 3) {
+                            //总百分比不能超过100%
+                            let total = 0;
+                            this.workForm.domains.forEach(w=>{total += w.progress});
+                            if (total > 100) {
+                                this.$message({
+                                        message: "用时比例之和不能超过100%",
+                                        type: "error"
+                                    });
+                                return;
+                            }
                         }
                         
                         this.listLoading = true;
@@ -1099,10 +1097,12 @@
                             } else if (this.reportTimeType.type == 1){
                                 formData.append("workingTime", this.workForm.domains[i].workingTime);
                             } else if (this.reportTimeType.type == 2) {
-
                                 formData.append("endTime", this.workForm.domains[i].endTime);
                                 formData.append("startTime", this.workForm.domains[i].startTime);
-                                
+                            } else if (this.reportTimeType.type == 3) {
+                                //按比例分配
+                                formData.append("progress", this.workForm.domains[i].progress);
+                                formData.append("workingTime", this.workForm.domains[i].workingTime);
                             }
                             
                             

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/main.js

@@ -13,12 +13,12 @@ import "@/components/Vant";
 
 import { Form , Toast , Grid, GridItem , DatetimePicker ,
 Picker , Dialog , NumberKeyboard , Sticky , Skeleton ,
-Panel , Divider , List , pullRefresh , SwipeCell, Checkbox, Search } from 'vant';
+Panel , Divider , List , pullRefresh , SwipeCell, Checkbox, Search, Slider } from 'vant';
 
 Vue.use(Form).use(Toast).use(Grid).use(GridItem).use(DatetimePicker)
 .use(Picker).use(Dialog).use(NumberKeyboard).use(Sticky).use(Skeleton)
 .use(Panel).use(Divider).use(List).use(pullRefresh).use(SwipeCell)
-.use(Checkbox).use(Search);
+.use(Checkbox).use(Search).use(Slider);
 
 // rem
 import "amfe-flexible";

+ 46 - 9
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -8,12 +8,12 @@
             <van-popup v-model="showPicker" position="bottom">
                 <van-datetime-picker v-model="currentDate" type="date" :min-date="minDate" :max-date="maxDate" @confirm="changeTime" @cancel="showPicker = false"/>
             </van-popup>
-
+            <van-cell title="总时长" v-if="reportTimeType.type == 3" :value="reportTimeType.allday.toFixed(1)+'小时'" ></van-cell>
             <!-- <van-cell title="待分配时长" :value="report.time + 'h'" size="large"></van-cell> -->
 
             <div class="form_domains" v-for="(item,index) in form.domains" :key="item.id">
-                <van-button v-if="index == 0" @click="addNewPro" class="form_addNew" icon="plus" type="info" size="mini">新增项目</van-button>
-                <van-icon v-else class="form_del" name="delete" @click="delPro(index)" />
+                <van-button v-if="index == 0" :disabled="!canEdit" @click="addNewPro" class="form_addNew" icon="plus" type="info" size="mini">新增项目</van-button>
+                <van-icon v-if="index>0&&canEdit" class="form_del" name="delete" @click="delPro(index)" />
 
                 <van-cell-group :title="'项目' + (index+1)">
                     <van-field readonly clickable name="projectId" :value="item.projectName" label="投入项目" placeholder="请选择投入项目" @click="clickPicker(index)"
@@ -21,7 +21,6 @@
                     <van-popup v-model="showPickerProject" position="bottom">
                         <van-picker show-toolbar :columns="project" value-key="projectName" @confirm="choseProject" @cancel="showPickerProject = false" />
                     </van-popup>
-
                     <!-- <van-field readonly clickable class="form_input" :value="item.workingTime" name="workingTime" label="工作时长" placeholder="请输入工作时长(单位:小时)"
                     :rules="[{ required: true, message: '请输入工作时长(单位:小时)' }]" @touchstart.native.stop="showNumberKey = true"/>
                     <van-number-keyboard v-model="item.workingTime" :show="showNumberKey" close-button-text="完成" extra-key="." :maxlength="4" @blur="showNumberKey = false" /> -->
@@ -66,6 +65,19 @@
                         />
                         <!-- :filter="filter" 原本这个属性在里面 -->
                     </van-popup>
+                    <van-cell v-if="reportTimeType.type == 3" >
+                        <template >
+                            <div>
+                        <span>用时占比</span>
+                        <van-slider :disabled="!canEdit" :min="10" :step="10" style="width:120px;display:inline-block;margin-left:50px;" v-model="item.progress" @change="item.workingTime = (reportTimeType.allday*item.progress/100).toFixed(1)" >
+                        <template #button>
+                            <div class="custom-button">{{ item.progress }}%</div>
+                        </template>
+                        </van-slider>
+                        <span style="margin-left:10px;float:right;">{{item.workingTime}}小时</span>
+                            </div>
+                        </template>
+                    </van-cell>
                     <van-field class="form_input" 
                     v-model="item.content" name="content" type="textarea" label="工作事项" placeholder="请输入工作事项" 
                     rows="3" autosize  />
@@ -81,14 +93,13 @@
             </div>
             <div class="form_btn" style="margin: 16px;">
                 <van-button v-if="canEdit" round block type="info" native-type="submit"> 提交 </van-button>
-                <van-button v-else round block type="info" disabled native-type="submit"> 提交 </van-button>
             </div>
         </van-form>
         <div style="padding:15px;">
             <van-button  v-if="canCancel" round block type="default" @click="cancel"> 撤销 </van-button>
         </div>
         
-        <div class="form_tip" v-if="!canEdit"> 当前日报无法修改 </div> 
+        <div class="form_tip" v-if="!canEdit && !canCancel"> 已审核无法修改 </div> 
     </div>
 </template>
 
@@ -328,7 +339,8 @@
                                     label: timeType[list[i].timeType].label,
                                     startTime: list[i].startTime,
                                     endTime: list[i].endTime,
-                                    isOvertime: flg
+                                    isOvertime: flg,
+                                    progress: list[i].progress,
                                 })
                                 if (list[i].state >= 2) {
                                     this.canEdit = true;
@@ -338,15 +350,19 @@
                             }
                             this.form.domains = array;
                         } else {
+                            this.canCancel = false;
+                            this.canEdit = true;
                             //没有填报的可以点击提交
                             this.form.domains = [{
                                 id: null,
                                 projectId: "",
                                 projectName: "",
-                                workingTime: "",
+                                workingTime: this.reportTimeType.type==3?(this.reportTimeType.allday*10/100).toFixed(1):"",
                                 content: "",
                                 state: 2,
+                                progress:10,
                             }]
+                            
                             this.canEdit = true;
                         }
                     } else {
@@ -382,7 +398,8 @@
                     id: null,
                     projectId: "",
                     projectName: "",
-                    workingTime: "",
+                    workingTime: this.reportTimeType.type==3?(10*this.reportTimeType.allday/100).toFixed(1):"",
+                    progress:10,
                     content: "",
                     state: 2,
                 })
@@ -436,6 +453,14 @@
                         this.$toast.fail("工作时间-全天,不能和上下午同时存在");
                         return;
                     }
+                } else if (this.reportTimeType.type == 3) {
+                    //总百分比不能超过100%
+                    let total = 0;
+                    this.form.domains.forEach(w=>{total += w.progress});
+                    if (total > 100) {
+                        this.$toast.fail("用时比例之和不能超过100%");
+                        return;
+                    }
                 }
                 
                 //填字段
@@ -460,6 +485,9 @@
                     } else if (this.reportTimeType.type == 2) {
                         formData.append("startTime", this.form.domains[i].startTime);
                         formData.append("endTime",this.form.domains[i].endTime);
+                    } else if (this.reportTimeType.type == 3) {
+                        formData.append("progress", this.form.domains[i].progress);
+                        formData.append("workingTime",this.form.domains[i].workingTime);
                     }
                     
                     if (this.form.domains[i].content == null || this.form.domains[i].content == '') {
@@ -558,6 +586,15 @@
         display: flex;
         align-items: center;
     }
+    .custom-button {
+    width: 40px;
+    color: #fff;
+    font-size: 10px;
+    line-height: 16px;
+    text-align: center;
+    background-color: #1989fa;
+    border-radius: 100px;
+  }
 </style>
 
 

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

@@ -53,6 +53,7 @@
             
         },
         mounted() {
+            console.log('user role==' + this.user.role);
             if (this.user.role == 0) {
                 //普通员工
                 if (this.user.leader) {

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue

@@ -46,7 +46,10 @@
                         let user = res.data;
                         this.$store.commit("updateLogin", true);
                         localStorage.userInfo = JSON.stringify(user);
+                        
                         this.$router.push("/index");
+                        //强制刷新,避免index页面中的mounted不执行
+                        window.location.reload();
                     } else {
                         toast.clear();
                         this.$toast.success('登录失败');