Переглянути джерело

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

seyason 1 рік тому
батько
коміт
1428939e14

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

@@ -967,7 +967,7 @@ public class TaskController {
             queryWrapper.eq("task.group_id",groupId);
         }
         if(!StringUtils.isEmpty(targetUserId)){
-            queryWrapper.like("task.executorId",targetUserId);
+            queryWrapper.like("task.executor_id",targetUserId);
         }
 //        else if (viewId == 3) {
 //            //今天的任务

+ 4 - 4
fhKeeper/formulahousekeeper/management-workshop/src/main/java/com/management/platform/service/impl/PlanServiceImpl.java

@@ -838,10 +838,10 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
                         BigDecimal decimal = new BigDecimal(allSum);
                         decimal=decimal.subtract(new BigDecimal(plan.getNum()));
                         decimal=decimal.add(new BigDecimal(plan.getNum())).setScale(2,BigDecimal.ROUND_HALF_UP);
-                        if(decimal.doubleValue()>product.getOrderNumber()){
-                            msg.setError("创建失败,该产品下的排产计划总数量大于当前产品下的订单数量");
-                            return msg;
-                        }
+//                        if(decimal.doubleValue()>product.getOrderNumber()){
+//                            msg.setError("创建失败,该产品下的排产计划总数量大于当前产品下的订单数量");
+//                            return msg;
+//                        }
                         List<ProdProcedure> list = procedureList.stream().filter(pl -> pl.getVersionNumber().equals(procedureList.get(0).getVersionNumber())).collect(Collectors.toList());
                         list=list.stream().sorted(Comparator.comparing(ProdProcedure::getId)).collect(Collectors.toList());
                         for (ProdProcedure prodProcedure : list) {

+ 9 - 6
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/orderInsert.vue

@@ -39,7 +39,7 @@
 
       <div class="left-laowang" style="flex: 0 0 180px; overflow: hidden;">
         <div class="left-laowangText">
-          {{ currentDepartmentText }}
+          {{ currentDepartmentText && currentDepartmentText.text }}
         </div>
         <div class="left-laowangTree">
           <el-tree :data="departmentList" @node-click="treeChange" :props="defaultProps" :draggable="adjustPosition"
@@ -359,7 +359,10 @@ export default {
           { required: true, message: "分类名称", trigger: "blur" },
         ],
       },
-      currentDepartmentText: ''
+      currentDepartmentText: {
+        id: '',
+        text: ''
+      }
     };
   },
   computed: {},
@@ -433,7 +436,7 @@ export default {
             this.departmentList = this.changeArr(dptlist);
             if(this.departmentList[0]) {
               const { value, label } = this.departmentList[0]
-              this.currentDepartmentText = label
+              this.currentDepartmentText = { id: value, text: label }
               this.getTableData(value)
             }
           } else {
@@ -453,7 +456,7 @@ export default {
     },
     treeChange(item) {
       const { value, label } = item
-      this.currentDepartmentText = label
+      this.currentDepartmentText = { id: value, text: label }
       this.getTableData(value)
     },
     changeArr(arr) {
@@ -574,12 +577,12 @@ export default {
     },
     // 获取车间数据
     getTableData(departmentId) {
-      console.log(this.planDate);
+      console.log(this.planDate, departmentId);
       this.tableDataLoading = true;
       this.http.post(
         "/plan/list",
         {
-          deptId: departmentId,
+          deptId: departmentId || this.currentDepartmentText.id,
           planType: this.planType,
           date: this.planDate,
           steelStampNumber: this.steelStampNumber,

+ 9 - 6
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/plan/planComponent.vue

@@ -45,7 +45,7 @@
       </div> -->
       <div class="left-laowang" style="flex: 0 0 180px; overflow: hidden;">
         <div class="left-laowangText">
-          {{ currentDepartmentText }}
+          {{ currentDepartmentText && currentDepartmentText.text }}
         </div>
         <div class="left-laowangTree">
           <el-tree :data="departmentList" @node-click="treeChange" :props="defaultProps" :draggable="adjustPosition" :allow-drop="allowDrop"
@@ -491,7 +491,7 @@ export default {
             this.departmentList = this.changeArr(dptlist);
             if(this.departmentList[0]) {
               const { value, label } = this.departmentList[0]
-              this.currentDepartmentText = label
+              this.currentDepartmentText = { id: value, text: label }
               this.getTableData(value)
             }
           } else {
@@ -511,7 +511,7 @@ export default {
     },
     treeChange(item) {
       const { value, label } = item
-      this.currentDepartmentText = label
+      this.currentDepartmentText = { id: value, text: label }
       this.getTableData(value)
     },
     changeArr(arr) {
@@ -677,12 +677,12 @@ export default {
     },
     // 获取车间数据
     getTableData(departmentId) {
-      console.log(this.planDate);
+      console.log(this.planDate, departmentId);
       this.tableDataLoading = true;
       this.http.post(
         "/plan/list",
         {
-          deptId: departmentId,
+          deptId: departmentId || this.currentDepartmentText.id,
           planType: this.planType,
           date: this.planDate,
           steelStampNumber: this.steelStampNumber,
@@ -756,7 +756,10 @@ export default {
             steelStampNumberEnd: ''
           }
         ],
-        currentDepartmentText: ''
+        currentDepartmentText: {
+          id: '',
+          text: ''
+        }
       }
     },
     addPlanData(formName) {

+ 9 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -98,6 +98,10 @@ const StringUtil = {
         reportSortScaleTable: false, // 项目分类工时占比表 // 
         reportSortDetailTable: false, // 分类全部工时明细表 // 
         reportSortSectionDetailTable: false, // 分类负责部门工时明细表 //
+        reportStaffProject: true, // 员工项目进度表 //
+        reportProjectConsumptionFirst: true, // 项目耗用进度表1 //
+        reportProjectConsumptionTwo: true, // 项目耗用进度表2 //
+        reportStaffTaskAccomplished: true, // 员工任务完成表 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -251,6 +255,11 @@ const StringUtil = {
         arr[i] == '项目分类工时占比表' ? obj.reportSortScaleTable = true : ''
         arr[i] == '分类全部工时明细表' ? obj.reportSortDetailTable = true : ''
         arr[i] == '分类负责部门工时明细表' ? obj.reportSortSectionDetailTable = true : ''
+
+        arr[i] == '员工项目进度表' ? obj.reportStaffProject = true : ''
+        arr[i] == '项目耗用进度表1' ? obj.reportProjectConsumptionFirst = true : ''
+        arr[i] == '项目耗用进度表2' ? obj.reportProjectConsumptionTwo = true : ''
+        arr[i] == '员工任务完成表' ? obj.reportStaffTaskAccomplished = true : ''
     }
     return obj
   }

+ 19 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -43,7 +43,10 @@
                   <el-menu-item index="1-21" v-if="permissions.reportEfficent"  @click="ssl(20)"><p>有效工时率表</p></el-menu-item>
                   <el-menu-item index="1-22" v-if="permissions.reportSortScaleTable" @click="ssl(21)"><p>项目分类工时占比表</p></el-menu-item>
                   <el-menu-item index="1-23" v-if="permissions.reportSortDetailTable || permissions.reportSortSectionDetailTable" @click="ssl(22)"><p>分类工时明细表</p></el-menu-item>
-                  <!-- <el-menu-item index="1-12"><p @click="ssl(11)">人员工时统计表</p></el-menu-item> -->
+                  <el-menu-item index="1-24" v-if="permissions.reportStaffProject" @click="ssl(23)"><p>员工项目进度表</p></el-menu-item>
+                  <el-menu-item index="1-25" v-if="permissions.reportProjectConsumptionFirst" @click="ssl(24)"><p>项目耗用进度表1</p></el-menu-item>
+                  <el-menu-item index="1-26" v-if="permissions.reportProjectConsumptionTwo" @click="ssl(25)"><p>项目耗用进度表2</p></el-menu-item>
+                  <el-menu-item index="1-27" v-if="permissions.reportStaffTaskAccomplished" @click="ssl(26)"><p>员工任务完成表</p></el-menu-item>
                 </el-submenu>
               </el-menu>
           </el-col>
@@ -1315,6 +1318,7 @@ export default {
   props: {},
   data() {
     return {
+      
       efficentList:[],
       groupNames: [],
       taskgroupList: [],
@@ -1371,13 +1375,15 @@ export default {
       this.$t('pojectbalancesheetincomestatement'),this.$t('customerprojectprofitstatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('statisticsofstafffillingintimerate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
-      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表', '有效工时率表', '项目分类工时占比表', '分类工时明细表'],
+      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表', '有效工时率表', '项目分类工时占比表', '分类工时明细表',
+      '员工项目进度表', '项目耗用进度表1', '项目耗用进度表2', '员工任务完成表'],
 
       shuzArr: [this.$t('projectreport'),this.$t('projectTaskReport'),this.$t('projectcoststatement'),
       this.$t('projectbalancesheet'),this.$t('customerprojectincomestatement'),this.$t('projectphasetimesheet'),
       this.$t('statisticsofovertimework'),this.$t('timecostearlywarningtable'),this.$t('personneltimeallocationtable'),
       this.$t('employeereporttimelinessrate'),this.$t('dailyreporttobereviewedstatistics'),this.$t('statisticsofpersonnelhours'),this.$t('taskgrouptimesheet'),this.$t('projectcostbaselinetable'),
-      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表','有效工时率表', '项目分类工时占比表', '分类工时明细表'],
+      this.$t('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), this.$t('ge-fen-zu-yu-jie-duan-gong-shi-biao'), '子项目工时成本表', '任务重启表', 'FTE报表','有效工时率表', '项目分类工时占比表', '分类工时明细表',
+      '员工项目进度表', '项目耗用进度表1', '项目耗用进度表2', '员工任务完成表'],
 
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
@@ -1599,6 +1605,10 @@ export default {
       if(this.permissions.reportEfficent) {this.ssl(20);this.defaultActive = '1-21';return} else
       if(this.permissions.reportSortScaleTable) {this.ssl(21);this.defaultActive = '1-22';return} else
       if(this.permissions.reportSortDetailTable || this.permissions.reportSortSectionDetailTable) {this.ssl(22);this.defaultActive = '1-23';return} else
+      if(this.permissions.reportStaffProject) {this.ssl(23);this.defaultActive = '1-24';return} else
+      if(this.permissions.reportProjectConsumptionFirst) {this.ssl(24);this.defaultActive = '1-25';return} else
+      if(this.permissions.reportProjectConsumptionTwo) {this.ssl(25);this.defaultActive = '1-26';return} else
+      if(this.permissions.reportStaffTaskAccomplished) {this.ssl(26);this.defaultActive = '1-27';return} else
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName){
@@ -1849,6 +1859,7 @@ export default {
                 this.getGroupWorktimeAll()
             },
             getList(e) {
+              let noUserList = [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]
               if(this.ins == 15) {
                 this.rangeDatas = null
               } else if(!e){
@@ -1883,8 +1894,8 @@ export default {
                 }else if(this.ins == 12){
                   this.groupWorktimeList.left = []
                   this.groupWorktimeList.right = []
-                    this.getGroupWorktimeList()
-                    this.getGroupWorktimeAll()
+                  this.getGroupWorktimeList()
+                  this.getGroupWorktimeAll()
                 }else if(this.ins == 13){
                   this.getOutputValueList()
                 } else if(this.ins == 14) {
@@ -1904,9 +1915,11 @@ export default {
                 } else if (this.ins == 20) {
                   this.getEffectiveLaborHourRate();
                 }
-                if(this.ins != 16 && this.ins != 17 && this.ins != 18 && this.ins != 19 && this.ins != 20 && this.ins != 21 && this.ins != 22) {
+
+                if(!noUserList.includes(this.ins)) {
                   this.getUserList()
                 }
+
                 if(this.ins == 21) {
                   this.getProjectWoekScale()
                 }

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

@@ -324,7 +324,7 @@
               <div style="display: inline-block;">
                 <el-form-item :label="'项目'">
                   <el-select v-model="selectProject" size="small" style="width: 162px" clearable filterable>
-                    <el-option v-for="item in projectList" :label="item.projectName" :value="item.id">
+                    <el-option v-for="item in projectList" :label="item.projectName" :value="item.id" :key="item.id">
                       <span style="float: left">{{ item.projectName }}</span>
                       <span style="float: right; color: #8492a6;">{{ item.projectCode }}</span>
                     </el-option>

+ 50 - 16
fhKeeper/formulahousekeeper/timesheet_h5/src/views/view/index.vue

@@ -24,7 +24,7 @@
                     </van-cell>
                 </van-sticky>
                 <van-sticky :offset-top="134" class="one_report_select">
-                    <van-cell title="选择人员" clickable :value="userNameValue" @click="selectUserShow = true"
+                    <van-cell title="选择人员" clickable :value="userNameValue" @click="showUserPopu()"
                         value-class="userNameValue">
                         <template #extra>
                             <van-icon v-if="selectPeopleVal.name" name="close" class="clearSeach"
@@ -36,7 +36,7 @@
                                     <ww-open-data type='userName' :openid='selectPeopleVal.name'></ww-open-data>
                                 </span>
                             </span>
-                            <span v-else>{{ userNameValue }}</span>
+                            <span v-else>{{ selectPeopleVal.name }}</span>
                         </template>
                     </van-cell>
                 </van-sticky>
@@ -194,8 +194,8 @@
             <van-popup v-model="selectUserShow" position="bottom" style="height: 90%">
                 <div class="popupDiv">
                     <div class="popupSearch">
-                        <van-search v-model.trim="searchInputValue" placeholder="输入员工姓名搜索" @clear="userListSearch" @search="userListSearch"
-                            shape="round" background="#F4F4F4"></van-search>
+                        <van-search v-model.trim="searchInputValue" placeholder="输入员工姓名搜索" @clear="userListSearch"
+                            @search="userListSearch" shape="round" background="#F4F4F4"></van-search>
                     </div>
 
                     <div class="popupCon conBorder" style="flex: 1;background-color: #fff;">
@@ -233,7 +233,7 @@
                             <span v-else>请选择部门</span>
                         </span>
                     </div>
-                    <div class="popupCon conBorder comTree" style="flex: 1;">
+                    <div class="popupCon conBorder comTree popupTree" style="flex: 1;">
                         <el-tree :data="departmentList" :props="defaultProps" @node-click="treeNodeClick">
                             <span class="custom-tree-node" slot-scope="{ node }">
                                 <span v-if="user.userNameNeedTranslate == '1'">
@@ -280,8 +280,9 @@ export default {
             statusTxt: ["待审核", "已通过", "已驳回", "待提交"],
             selectUserShow: false,
             searchInputValue: '',
-            userList: '',
-            showUserList: '',
+            userList: [],
+            showUserList: [],
+            firstUserList: [],
             userIdList: '',
             userNameValue: '',
             selectPeopleVal: {},
@@ -309,16 +310,23 @@ export default {
         back() {
             history.back();
         },
-        getUsers() {
+        getUsers(flag = true) {
+            let deptId = this.selectDepartmentText[0] && this.selectDepartmentText[0].id
             this.$axios.post("/user/getEmployeeList", {
-                departmentId: -1,
+                departmentId: deptId || -1,
                 pageIndex: 1,
                 pageSize: -1
             })
                 .then(res => {
                     if (res.code == "ok") {
-                        this.userList = res.data.records;
-                        this.showUserList = res.data.records
+                        if(flag) {
+                            this.userList = res.data.records;
+                            this.showUserList = res.data.records
+                            this.firstUserList = res.data.records
+                        } else {
+                            this.userList = res.data.records;
+                            this.showUserList = res.data.records
+                        }
                     } else {
                         this.$toast.fail('获取失败');
                     }
@@ -336,7 +344,7 @@ export default {
         },
         userListSearch(val) {
             const { userNameNeedTranslate } = this.user
-            if(!this.searchInputValue) {
+            if (!this.searchInputValue) {
                 this.showUserList = JSON.parse(JSON.stringify(this.userList))
                 return
             }
@@ -347,8 +355,10 @@ export default {
             }
 
             if (userNameNeedTranslate == 1) {
+                let deptId = this.selectDepartmentText[0] && this.selectDepartmentText[0].id
                 this.$axios.post("/user/getEmployeeList", {
-                    departmentId: -1, pageIndex: 1, pageSize: 200,
+                    departmentId: deptId || -1, 
+                    pageIndex: 1, pageSize: -1,
                     keyword: this.searchInputValue, status: '',
                     roleId: '', cursor: '', onlyDirect: 0, matchingType: 0
                 })
@@ -376,11 +386,20 @@ export default {
                 this.selectPeopleVal = {}
             }
             if (str == 'dept') {
-                this.departmentText = '',
-                    this.selectDepartmentText = []
+                this.departmentText = ''
+                this.selectDepartmentText = []
             }
             this.getReport()
         },
+        showUserPopu() {
+            if (!this.departmentText) {
+                this.showUserList = JSON.parse(JSON.stringify(this.firstUserList))
+            } else {
+                this.showUserList = JSON.parse(JSON.stringify(this.userList))
+            }
+            this.searchInputValue = ''
+            this.selectUserShow = true
+        },
         treeNodeClick(item) {
             this.selectDepartmentText = [item]
         },
@@ -391,6 +410,7 @@ export default {
             }
             this.departmentText = this.selectDepartmentText[0].label
             this.selectDepartmentShow = false
+            this.getUsers(false)
             this.getReport()
         },
         // 时间转换
@@ -431,6 +451,7 @@ export default {
                 forbidClick: true,
                 duration: 0
             });
+            this.nowTime = '2023-04-13'
             let pames = {
                 date: this.nowTime,
             }
@@ -509,6 +530,19 @@ export default {
 </script>
 
 <style lang="less" scoped>
+.popupTree {
+    font-size: 20px;
+    padding: 20px 10px;
+
+    /deep/ .el-tree-node {
+        margin-bottom: 10px;
+    }
+
+    /deep/ .el-tree-node__content>.el-tree-node__expand-icon {
+        font-size: 20px;
+    }
+}
+
 .login_form {
     margin-top: 46px;
 }
@@ -549,7 +583,7 @@ export default {
     background: #fff;
     padding: 10px 10px;
     border-radius: 6px;
-    font-size: 14px;
+    font-size: 20px;
     color: #606266;
 }