ソースを参照

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

ggooalice 2 年 前
コミット
a478644fbb

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

@@ -2230,6 +2230,22 @@ public class WeiXinCorpController {
             //设置人员所属部门
             List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
             List<User> existingUsers = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
+            //检查是否有不在授权范围内的人员
+            List<User> removedUserList = existingUsers.stream().filter(ex -> !allCorpWxUserList.stream().anyMatch(corpwxUser -> corpwxUser.getCorpwxUserid().equals(ex.getCorpwxUserid()))).collect(Collectors.toList());
+            List<User> setInactiveList = new ArrayList<>();
+            removedUserList.forEach(re->{
+                if (re.getIsActive() == 1) {
+                    User u = new User();
+                    u.setId(re.getId());
+                    u.setIsActive(0);
+                    u.setInactiveDate(LocalDate.now());
+                    setInactiveList.add(u);
+                }
+            });
+            //批量设置为停用
+            if (setInactiveList.size() > 0) {
+                userService.updateBatchById(setInactiveList);
+            }
             List<User> newUserList = allCorpWxUserList.stream().filter(newItem -> !existingUsers.stream().anyMatch(existingItem -> newItem.getCorpwxUserid().equals(existingItem.getCorpwxUserid()))).collect(Collectors.toList());
             newUserList.forEach(newItem->{
                 if (newItem.getCorpwxDeptid() != 1) {
@@ -3643,7 +3659,7 @@ public class WeiXinCorpController {
         JSONObject docItem = new JSONObject();
         docItem.put("type", 1);
         docItem.put("title", "使用指南");
-        docItem.put("url", "https://doc.weixin.qq.com/doc/w3_AQAACQauAEA1Ucywi0bQGy7XLaYYE?scode=AMsA1AfkAAgde2tFhrAFIAdQbyAPU");
+        docItem.put("url", "https://www.ttkuaiban.com/download/%E5%B7%A5%E6%97%B6%E7%AE%A1%E5%AE%B6%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E%E4%B9%A6.pdf");
         array.add(docItem);
         JSONObject enterItem = new JSONObject();
         enterItem.put("type", 1);

+ 2 - 14
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -115,19 +115,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                 List<Integer> targetRoleIds = sysRoleMapper.selectList(new QueryWrapper<SysRole>().eq("company_id", user.getCompanyId()).in("id", roleIds))
                         .stream().map(sl -> sl.getId()).distinct().collect(Collectors.toList());
                 List<User> targetUserList = userMapper.selectList(new QueryWrapper<User>().in("role_id", targetRoleIds));
-                StringBuffer sb = new StringBuffer();
-                if(CollectionUtils.isNotEmpty(targetUserList)) {
-                    for (int i = 0; i < targetUserList.size(); i++) {
-                        if(targetUserList.get(i).getCorpwxUserid()==null){
-                            continue;
-                        }
-                        if (i == 0) {
-                            sb.append(targetUserList.get(i).getCorpwxUserid());
-                        } else {
-                            sb.append("|").append(targetUserList.get(i).getCorpwxUserid());
-                        }
-                    }
-                }
+                String corpUserString = targetUserList.stream().map(tl -> tl.getCorpwxUserid()).collect(Collectors.joining("|"));
                 User targetUser = userMapper.selectById(sheet.getOwnerId());
                 //推送到企业微信
                 JSONObject json=new JSONObject();
@@ -155,7 +143,7 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                 json.put("template_id","tty9TkCAAALUiWvjdoDg_PZf48gwucZA");
                 json.put("url","https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://worktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=expense#wechat_redirect");
                 json.put("content_item",dataJson);
-                wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfo,sb.toString(), json);
+                wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfo,corpUserString, json);
                 List<Information> informationList=new ArrayList<>();
                 for (User item : targetUserList) {
                     Information information=new Information();

+ 0 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -8685,10 +8685,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         List<Integer> projectIds = projectGroupAndCategoryList.stream().map(pl ->Integer.valueOf(String.valueOf(pl.get("projectId")))).distinct().collect(Collectors.toList());
         List<Stages> stagesList = stagesMapper.selectList(new QueryWrapper<Stages>().in("project_id", projectIds));
         List<String> titleList=new ArrayList<>();
-        titleList.add("项目编号");
-        titleList.add("项目名称");
-        titleList.add("任务分组");
-        titleList.add("分组合计工时");
         List<String> stagesNameList = stagesList.stream().map(sl -> sl.getStagesName()).distinct().collect(Collectors.toList());
         stagesNameList.add("非阶段");
         titleList.addAll(stagesNameList);

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -638,6 +638,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     .setPassword(MD5Util.getPassword("000000"))
                     .setCorpwxUserid(corpwxOpenId)
                     .setColor(ColorUtil.randomColor())
+                    .setIsActive(1) //默认为在职,因为直接返回了该对象,外层调用会去判断是否在职,所以此处要在代码层赋值,不能依赖于数据库的默认值
                     .setCompanyId(companyId);
             Integer employeeCnt = userMapper.selectCount(new QueryWrapper<User>().eq("company_id", companyId).eq("is_active",1));
             Company company = companyMapper.selectOne(new QueryWrapper<Company>().eq("id", companyId));

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -259,6 +259,7 @@ export default {
                     id: item.value,
                     distinction: this.distinction
                 }
+                console.log('将要传出去的值1', obj)
                 this.$emit('vueCasader', obj)
             }
             if(this.radios) {
@@ -268,6 +269,7 @@ export default {
                     distinction: this.distinction,
                     item: item
                 }
+                console.log('将要传出去的值2', obj)
                 this.$emit('vueCasader', obj)
             } else {
                 this.transitionBoxLiIdx = ''

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -1460,5 +1460,6 @@
   "zan-wu-ren-wu": "No job at the moment",
   "xiu-gai-xiang-mu-dang-qian-jie-duan": "Modifying the current phase",
   "zheng-shi-xiang-mu": "Formal Project",
-  "fei-xiang-mu": "Non item"
+  "fei-xiang-mu": "Non item",
+  "zheng-shi-xiang-mu-zhi-dui-can-yu-ren-kai-fang-fei-xiang-mu-dui-suo-you-cheng-yuan-kai-fang": "Formal projects are open to participants only, non-projects are open to all members"
 }

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -1460,5 +1460,6 @@
   "ren-wu-jie-zhi-shi-jian-bu-neng-xiao-yu-kai-shi-shi-jian": "任务截止时间不能小于开始时间",
   "xiu-gai-xiang-mu-dang-qian-jie-duan": "修改项目当前阶段",
   "zheng-shi-xiang-mu": "正式项目",
-  "fei-xiang-mu": "非项目"
+  "fei-xiang-mu": "非项目",
+  "zheng-shi-xiang-mu-zhi-dui-can-yu-ren-kai-fang-fei-xiang-mu-dui-suo-you-cheng-yuan-kai-fang": "正式项目只对参与人开放,非项目对所有成员开放"
 }

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

@@ -75,6 +75,8 @@ const StringUtil = {
         reportResponsiblePersonnel: false, // 负责部门月度工时表   //
         reportAllDepartmentParticipation: false, // 全部部门参与项目情况表 //
         reportResponsibleDepartmentParticipation: false, // 负责部门参与项目情况表 //
+        reportPhaseHours: false, // 全部分组阶段工时 // 
+        reportStageWorkingTime: false, // 负责项目分组阶段工时 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -199,6 +201,8 @@ const StringUtil = {
         arr[i] == '全部部门参与项目情况表' ? obj.reportAllDepartmentParticipation = true : ''
         arr[i] == '负责部门参与项目情况表' ? obj.reportResponsibleDepartmentParticipation = true : ''
         arr[i] == '编辑负责项目编码和名称' ? obj.projectCodeAndName = true : ''
+        arr[i] == '全部分组阶段工时' ? obj.reportPhaseHours = true : ''
+        arr[i] == '负责项目分组阶段工时' ? obj.reportStageWorkingTime = true : ''
     }
 
     return obj

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

@@ -53,7 +53,7 @@
                             </div>
                             <div>
                                 <div>
-                                    <el-link type="primary" :underline="false" href="https://doc.weixin.qq.com/doc/w3_AQAACQauAEA1Ucywi0bQGy7XLaYYE?scode=AMsA1AfkAAgBITHypgAQAACQauAEA">点击查看操作手册</el-link>
+                                    <el-link type="primary" :underline="false" href="https://www.ttkuaiban.com/download/%E5%B7%A5%E6%97%B6%E7%AE%A1%E5%AE%B6%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E%E4%B9%A6.pdf">点击查看操作手册</el-link>
                                 </div>
                             </div>
                         </el-dropdown-item>

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

@@ -36,6 +36,7 @@
                   <el-menu-item index="1-12" v-if="permissions.reportPersonnel || permissions.reportResponsible" @click="ssl(11)"><p>{{ $t('statisticsofpersonnelhours') }}</p></el-menu-item>
                   <el-menu-item index="1-15" v-if="permissions.reportMonthlyPersonnel || permissions.reportResponsiblePersonnel" @click="ssl(14)"><p>{{ $t('ren-yuan-yue-du-gong-shi-biao') }}</p></el-menu-item>
                   <el-menu-item index="1-16" v-if="permissions.reportAllDepartmentParticipation || permissions.reportResponsibleDepartmentParticipation" @click="ssl(15)"><p>{{ $t('bumenchanyuqingkuang') }}</p></el-menu-item>
+                  <el-menu-item index="1-17" v-if="permissions.reportPhaseHours || permissions.reportStageWorkingTime" @click="ssl(16)"><p>项目各分组与阶段工时表</p></el-menu-item>
                   <!-- <el-menu-item index="1-12"><p @click="ssl(11)">人员工时统计表</p></el-menu-item> -->
                 </el-submenu>
               </el-menu>
@@ -69,7 +70,7 @@
           </el-select>
         </template>
         <!-- 时间段筛选 -->
-          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 5">
+          <template v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11 || ins == 12 || ins == 5 || ins == 16">
             <span>
               <span class="demonstration" style="color:#999;padding:0 10px">
                 {{ ins == 15 ? $t('xiang-mu-chuang-jian-shi-jian-duan') : $t('message.period') }}
@@ -780,6 +781,21 @@
                 <el-table-column align="center" prop="tripPeopleCount" :label="'出差人数'" min-width="150"></el-table-column>
             </el-table>
 
+            <!-- 项目各分组与阶段工时表 -->
+            <el-table v-if="ins == 16"  key="16" border :data="groupingItemsArr" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+                <el-table-column align="center" prop="projectCode" label="项目编号" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="projectName" label="项目名称" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="groupName" label="任务分组" min-width="150"></el-table-column>
+                <el-table-column align="center" prop="workingTime" label="分组合计工时" min-width="150"></el-table-column>
+                <el-table-column align="center" :label="item" min-width="150" v-for="(item, index) in groupingItemsArrTitle" :key="index">
+                  <template slot-scope="scope">
+                    <div>
+                      {{scope.row.categoryList | categoryListName(scope.column.label)}}
+                    </div>
+                  </template>
+                </el-table-column>
+            </el-table>
+
         <!--工具条-->
         <el-col :span="24" class="toolbar" v-if="ins != 6">
           <el-pagination
@@ -1047,13 +1063,14 @@ 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('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), '各分组与阶段工时表'],
 
       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('ren-yuan-yue-du-gong-shi-biao'), this.$t('bumenchanyuqingkuang'), '各分组与阶段工时表'],
+
       ins: 10000,
       user: JSON.parse(sessionStorage.user),
       overTimeList: [], // 项目加班情况统计列表
@@ -1112,7 +1129,9 @@ export default {
         year: '2022',
         quarter: 1
       },
-      exportLoading: false
+      exportLoading: false,
+      groupingItemsArr: [],
+      groupingItemsArrTitle: []
     };
   },
   computed: {},
@@ -1142,7 +1161,6 @@ export default {
     this.monthPersonnel = year + '-' + yue
   },
   filters: {
-      
       numberToCurrency(value) {
           if (value == undefined || !value) return '0.00'
           value = value.toFixed(2)
@@ -1172,6 +1190,15 @@ export default {
             s += '0';  
         }  
         return s;  
+      },
+      categoryListName(value, label) {
+        let str = '-'
+        for(var i in value) {
+          if(value[i].stagesName == label) {
+            str = value[i].workingTime
+          }
+        }
+        return str
       }
   },
   methods: {
@@ -1192,6 +1219,7 @@ export default {
       if(this.permissions.reportPersonnel || this.permissions.reportResponsible) {this.ssl(11);this.defaultActive = '1-12';return}
       if(this.permissions.reportMonthlyPersonnel || this.permissions.reportResponsiblePersonnel) {this.ssl(14);this.defaultActive = '1-15';return}
       if(this.permissions.reportAllDepartmentParticipation || this.permissions.reportResponsibleDepartmentParticipation) {this.ssl(15);this.defaultActive = '1-16';return}
+      if(this.permissions.reportPhaseHours || this.permissions.reportStageWorkingTime) {this.ssl(16);this.defaultActive = '1-17';return}
       {this.allWrong = false}
     },
     rowspan(spanArr,position,spanName){
@@ -1431,8 +1459,12 @@ export default {
                   this.getMonthlyPersonnel()
                 } else if(this.ins == 15) {
                   this.getDepartmentsInvolved()
+                } else if(this.ins == 16) {
+                  this.groupingItems()
+                }
+                if(this.ins != 16) {
+                  this.getUserList()
                 }
-                this.getUserList()
             },
       exportExcel() {
         var url = "/project";
@@ -1539,6 +1571,12 @@ export default {
           url += "/exportDeptPartInProjects"
           sl.month = this.monthPersonnel + '-01'
           sl.departmentId = this.departmentIdArray.length > 0 ? this.departmentIdArray[this.departmentIdArray.length - 1] : ''
+        } else if(this.ins == 16) {
+          fName = '各分组阶段工时表' + '.xls'
+          url += "/exportProjectGroupAndCategoryWorkTime"
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
+          sl.projectId = this.proJuctId
         }
           this.http.post(url, sl,
             res => {
@@ -1809,6 +1847,38 @@ export default {
         })
       })
     },
+    // 项目各分组与阶段工时表
+    groupingItems() {
+      this.listLoading = true
+      this.http.post('/project/projectGroupAndCategoryWorkTime', {
+         startDate: this.rangeDatas[0],
+         endDate: this.rangeDatas[1],
+         projectId: this.proJuctId,
+         pageIndex: this.page,
+         pageSize: this.size,
+      },
+        res => {
+            this.listLoading = false
+            if (res.code == "ok") {
+                // console.log(res.data, '数据来源')
+                this.groupingItemsArr = res.data.data
+                this.groupingItemsArrTitle = res.data.titleList
+                this.total = res.data.total
+            } else {
+                this.listLoading = false
+                this.$message({
+                  message: res.msg,
+                  type: "error"
+                });
+            }
+        },
+        error => {
+            this.$message({
+                message: error,
+                type: "error"
+            });
+        });
+    },
     overTime() {
       this.listLoading = true;
       var obj = {

+ 12 - 37
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -126,19 +126,6 @@
                         <el-radio label="1" v-if="addForm.leaveType != 6">{{ $t('leavehour') }}</el-radio>
                     </el-radio-group>
                 </el-form-item>
-                <!-- 选择审批人 -->
-                <el-form-item :label="$t('approver')" style="width:300px" prop="projectAuditorJson">
-                    <el-select style="display:inline-block;width:250px;" multiple v-model="addForm.projectAuditorJson" :placeholder="$t('defaultText.pleaseChoose')" v-if="user.userNameNeedTranslate != 1">
-                      <el-option
-                      v-for="item in approverList"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.id"
-                      ></el-option>
-                    </el-select>
-
-                     <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :multiSelect="true" :widthStr="'250'" :subject="users" :subjectId="addForm.ownerId" :distinction="'2'" @selectCal="selectCal"></selectCat>
-                </el-form-item>
                 <!-- 时间选择 -->
                 <el-form-item :label="flg ? $t('optiondate') : $t('other.timeSelection')" style="width: 100%;">
                     <el-col style="display: inline-block; width: 240px">
@@ -409,7 +396,11 @@
         <el-col :span="18" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-right:20px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
-                <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">{{depData.label}}&gt;</span> {{ $t('approvalprocessforleaveofdirect staff') }}
+                <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">
+                  <!-- {{depData.label}} -->
+                    <span v-if="user.userNameNeedTranslate != 1">{{depData.label}}</span>
+                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
+                  &gt;</span> {{ $t('approvalprocessforleaveofdirect staff') }}
                     <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" content="仅适用于当前部门的直属人员,子部门人员的审批流程需要单独设置" placement="top-start">
                     <i class="el-icon-question"></i>
                     </el-tooltip>
@@ -450,9 +441,9 @@
               <el-form label-width="140px">
               <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
                   <el-cascader filterable ref="deptCascader"  v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept"
-                    :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-if="user.userNameNeedTranslate != 1"></el-cascader>
+                    :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
 
-                  <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+                  <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
 
               </el-form-item>
               </el-form>
@@ -738,8 +729,7 @@ export default {
         ownerId: [{ required: true, message: this.$t('pleaseselectthepersonaskingforleave'), trigger: "blur" }],
         tel: [{required: true, validator: checkTel, trigger: 'blur'}],
         timeDays: [{required: true, validator: checks, trigger: 'blur'}],
-        leaveType: [{ required: true, message: this.$t('pleaseselectthetypeofleave'), trigger: "blur" }],
-        projectAuditorJson: [{ required: true, message: this.$t('pleaseselectapprover'), trigger: "blur" }]
+        leaveType: [{ required: true, message: this.$t('pleaseselectthetypeofleave'), trigger: "blur" }]
       },
       user: JSON.parse(sessionStorage.getItem("user")),
       shuz: [this.$t('personalleaveisallowed'), this.$t('leaveisallowed'), this.$t('annualleaveisallowed'), this.$t('maternityleaveisallowed')],
@@ -754,8 +744,7 @@ export default {
         // indate: this.getCurrentTime(),
         timeHours: 8,
         tel: '',
-        remark: '',
-        projectAuditorJson: ''
+        remark: ''
       },
       displayTable: false,
       users: [], // 人员信息
@@ -1307,6 +1296,7 @@ export default {
                         if (arr[i].children != null && arr[i].children.length>0) {
                             arr[i].children = this.changeArr(arr[i].children);
                         }
+                        arr[i].type = 'dep'
                         arr[i].id && (arr[i].value = arr[i].id);
                         delete arr[i].id;
                     }
@@ -1474,7 +1464,7 @@ export default {
                 // this.users = res.data.records;
                 this.users = res.data;
                 for (let i = 0; i < this.users.length; i++) {
-                  this.susers.push({value:this.users[i].id,label:this.users[i].name})
+                  this.susers.push({value:this.users[i].id,label:this.users[i].name,type: 'user'})
                 }
                 //只能自己填报自己的请假单
                 this.addForm.ownerId = this.user.id;
@@ -1643,7 +1633,6 @@ export default {
         this.$refs.addForm.validate(valid => {
           this.addForm.endDate = this.buling(this.addForm.endDate)
           this.addForm.startDate = this.buling(this.addForm.startDate)
-          // this.addForm.projectAuditorJson = JSON.stringify(this.addForm.projectAuditorJson)
           if (valid) {
             this.http.post('/leave-sheet/add', this.addForm,
             res => {
@@ -1659,20 +1648,7 @@ export default {
                     this.addForm.leaveType = 0
                     this.addForm.timeHours = 8
                     this.addForm.remark = ''
-                    this.addForm.projectAuditorJson = ''
-                    // this.addForm = {
-                    //   timeType: '0',
-                    //   startDate: this.getCurrentTime(),
-                    //   endDate: this.getCurrentTime(),
-                    //   timeDays: 1,
-                    //   leaveType: 0,
-                    //   ownerId: '',
-                    //   // indate: this.getCurrentTime(),
-                    //   timeHours: 8,
-                    //   tel: '',
-                    //   remark: '',
-                    //   projectAuditorJson: ''
-                    // }
+                    
                     this.flg = true
                 } else {
                     this.$message({
@@ -1980,7 +1956,6 @@ export default {
         for(let i in obj.arrUserList) {
           arr.push(obj.arrUserList[i].id)
         }
-        this.addForm.projectAuditorJson = arr
       } else if(obj.distinction == '3') {
         this.ownerIds = obj.id
         this.chufas()

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

@@ -71,7 +71,7 @@
                 </el-form-item>
                 <el-form-item :label="$t('classificationSuppliers')" prop="providerCategoryId">
                     <el-select v-model="addForm.providerCategoryId" filterable :placeholder="$t('defaultText.pleaseChoose')" clearable @change="supplierChange">
-                        <el-option v-for="item in baseClfList" :key="item.id" ::label="item.providerCategoryName" :value="item.id"></el-option>
+                        <el-option v-for="item in baseClfList" :key="item.id" :label="item.providerCategoryName" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item :label="$t('contact')" prop="contactName">

+ 23 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/workflow/report.vue

@@ -28,7 +28,10 @@
         <el-col :span="18" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-right:20px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
-                <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">{{depData.label}}&gt;</span> {{ $t('workinghoursapprovalprocessofdirectstaff') }}
+                <div style="padding:5px;color:#333;" v-if="depData != null">{{ $t('setup') }} &lt;<span style="color:#20a0ff;">
+                    <span v-if="user.userNameNeedTranslate != 1">{{depData.label}}</span>
+                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='depData.label'></ww-open-data></span>
+                    &gt;</span> {{ $t('workinghoursapprovalprocessofdirectstaff') }}
                     <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" :content="$t('onlyapplicabletotheimmediatestaffofthecurrentdepartment')" placement="top-start">
                     <i class="el-icon-question"></i>
                     </el-tooltip>
@@ -41,7 +44,12 @@
                     <icon class="iconfont firerock-iconright"></icon>
                     <span v-for="(item, index) in dataArray" :key="item.seq" >
                         
-                        <el-button type="primary" v-if="item.isDeptAudit == 1" @click="editNodeDialog(index, item)">{{item.auditDeptName}}</el-button>
+                        <el-button type="primary" v-if="item.isDeptAudit == 1" @click="editNodeDialog(index, item)">
+                            <span v-if="user.userNameNeedTranslate != 1">{{item.auditDeptName}}</span>
+                            <span v-if="user.userNameNeedTranslate == 1">
+                                <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
+                            </span>
+                        </el-button>
                         <el-button type="primary" v-if="item.isDeptAudit == 0" >{{ $t('other.projectAuditor') }}</el-button>
                         <icon class="iconfont firerock-iconright"></icon>
                         <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(index+1)"></icon>
@@ -68,7 +76,8 @@
               <el-form-item :label="$t('other.selectdepartment')" >
                   <el-cascader ref="deptCascader"  v-model="curDeptId" :placeholder="$t('qing-xuan-ze-bu-men')" style="width: 100%" @change="chooseDept"
                     :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
-                <vueCascader :size="'small'" :subjectId="curDeptId" :widthStr="'200'" :clearable="true" :subject="option" :radios="true" :distinction="'3'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+
+                    <vueCascader :size="'small'" :subjectId="curDeptId" :widthStr="'200'" :clearable="true" :subject="option" :radios="true" :distinction="'3'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
               </el-form-item>
               </el-form>
             <div slot="footer" class="dialog-footer">
@@ -123,7 +132,8 @@
                 editNode:{},
                 user: JSON.parse(sessionStorage.getItem("user")),
                 userList:[],
-                sysAuditUSer:{}
+                sysAuditUSer:{},
+                addNodeObj: {}
             };
         },
         components: {
@@ -243,7 +253,14 @@
             addNode() {
               this.dialogVisible = false;
               if (this.curDeptId == null) return;
-              var node = this.$refs.deptCascader.getCheckedNodes()[0];
+              var node = ''
+              if(this.user.userNameNeedTranslate != 1) {
+                node = this.$refs.deptCascader.getCheckedNodes()[0];
+              } else {
+                node = this.addNodeObj
+              }
+              
+              console.log(node)
               
               if (this.isAdd) {
                 var node = {auditDeptId: node.value, auditDeptName: node.label, isDeptAudit:1};
@@ -347,6 +364,7 @@
                     let arr = []
                     arr.push(obj.id)
                     this.curDeptId = arr
+                    this.addNodeObj = obj.item
                 }
             }
 

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

@@ -47,21 +47,10 @@
             }
         },
         mounted() {
-            // 手机上看控制台
-            // if(this.user.companyName == '比基尼小镇'){
-            //     let consoleScript = document.createElement("script");
-            //     consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
-            //     consoleScript.onload = function () {
-            //         new VConsole()
-            //     }
-            //     document.head.appendChild(consoleScript);
-            // }
-
             //有错误信息,优先跳转到登录页面去
             if(window.location.href.indexOf('errorMsg') != '-1') {
                 this.$router.push("/login");
             }
-            
             var ua = navigator.userAgent.toLowerCase();
             if (ua.indexOf("wxwork") > 0) {
                 this.isCorpWX = true;

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/my/children/center.vue

@@ -14,7 +14,7 @@
         <main class="mt-10">
             <div class="bg-fff">
                 <van-cell title="账号" v-if="userInfo.userNameNeedTranslate != '1'" :title-style="'flex: 0.5;'" :value="userInfo.phone"></van-cell>
-                <van-cell title="工号" :title-style="'flex: 0.5;'" :value="userInfo.jobNumber"></van-cell>
+                <van-cell title="工号" v-if="userInfo.jobNumber" :title-style="'flex: 0.5;'" :value="userInfo.jobNumber"></van-cell>
                 <van-cell title="公司" :title-style="'flex: 0.5;'" :value="userInfo.companyName"></van-cell>
                 <!-- <van-cell title="修改密码" isLink to="/my/set"></van-cell> -->
             </div>
@@ -25,6 +25,7 @@
                 </template>
             </van-cell>
             <van-button class="logout" @click="logout" block round type="danger" v-if="!isCorpWX">退出登录</van-button>
+            <!-- <van-button class="logout" @click="logout" block round type="danger" >退出登录</van-button> -->
         </main>
 
         <Footer page="my" />