فهرست منبع

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

seyason 1 سال پیش
والد
کامیت
a3a5851e01

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

@@ -447,7 +447,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                         Optional<User> first = null;
                         if ((isCorpWxUser)||(dingding!=null&&dingding.getContactNeedTranslate()==1)) {
                             Optional<User> optional = targetUserList.stream().filter(tl -> tl.getName().equals(executorName)).findFirst();
-                            first = allUserList.stream().filter(u->(optional.isPresent()&&((u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))||(u.getDingdingUserid().equals(optional.get().getCorpwxUserid()))))).findFirst();
+                            first = allUserList.stream().filter(u->(optional.isPresent()&&((u.getCorpwxUserid()!=null&&u.getCorpwxUserid().equals(optional.get().getCorpwxUserid()))||(u.getDingdingUserid()!=null&&u.getDingdingUserid().equals(optional.get().getCorpwxUserid()))))).findFirst();
                         } else {
                             first = allUserList.stream().filter(u ->u.getName().equals(executorName)).findFirst();
                         }

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

@@ -756,7 +756,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
             List<UserReportDept> userReportDepts = userReportDeptService.list(new LambdaQueryWrapper<UserReportDept>().eq(UserReportDept::getUserId, id));
             if(userReportDepts.size()>0){
                 List<Integer> deptIds = userReportDepts.stream().map(UserReportDept::getDeptId).distinct().collect(Collectors.toList());
-                List<Department> departmentList = departmentMapper.selectList(new LambdaQueryWrapper<Department>().eq(Department::getDepartmentId, deptIds));
+                List<Department> departmentList = departmentMapper.selectList(new LambdaQueryWrapper<Department>().in(Department::getDepartmentId, deptIds));
                 user.setUserReportDeptList(departmentList);
             }else {
                 user.setUserReportDeptList(new ArrayList<>());

BIN
fhKeeper/formulahousekeeper/management-platform/费用报销导入模板.xlsx


+ 3 - 0
fhKeeper/formulahousekeeper/octopus/src/views/customer/list.vue

@@ -251,6 +251,7 @@
                     <el-form-item><el-checkbox v-model="dialogData.easyExpense">是否开启简易费用报销</el-checkbox></el-form-item>
                     <el-form-item><el-checkbox v-model="dialogData.enableNewWeeklyfill">是否启用新的按周填报模式</el-checkbox></el-form-item>
                     <el-form-item><el-checkbox v-model="dialogData.hideSubproject">是否去除子项目</el-checkbox></el-form-item>
+                    <el-form-item><el-checkbox v-model="dialogData.userWithMultiDept">是否开启人员设置可填报部门</el-checkbox></el-form-item>
                 </el-form>
             </div>
             <!-- 是否开启审批流设置,是否启用主项目模式,是否秘薪模式,是否显示日报审批流程,是否CRO企业,是否仅使用导入日报审核(不要项目审核) reportAuditType-->
@@ -475,6 +476,7 @@ import App from '../../App.vue';
                             this.$set(this.dialogData,'easyExpense',res.data.easyExpense ? true : false)
                             this.$set(this.dialogData,'enableNewWeeklyfill',res.data.enableNewWeeklyfill ? true : false)
                             this.$set(this.dialogData,'hideSubproject',res.data.hideSubproject ? true : false)
+                            this.$set(this.dialogData,'userWithMultiDept',res.data.userWithMultiDept ? true : false)
                         }else{
                             this.$message({
                                 message: res.msg,
@@ -797,6 +799,7 @@ import App from '../../App.vue';
                     easyExpense: this.dialogData.easyExpense ? 1 : 0,
                     enableNewWeeklyfill: this.dialogData.enableNewWeeklyfill ? 1 : 0,
                     hideSubproject:this.dialogData.hideSubproject ? 1: 0, 
+                    userWithMultiDept:this.dialogData.userWithMultiDept ? 1: 0, 
                 },res => {
                     if(res.code == 'ok'){
                         this.editDialogG = false

+ 6 - 0
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -563,6 +563,12 @@ public class TimeType extends Model<TimeType> {
     @TableField("report_audit_flow_enable_super_dept_aduit")
     private Integer reportAuditFlowEnableSuperDeptAduit;
 
+    /**
+     * 是否开启设置可填报部门 0-否 1-是
+     */
+    @TableField("user_with_multi_dept")
+    private Integer userWithMultiDept;
+
 
     @Override
     protected Serializable pkVal() {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 1
fhKeeper/formulahousekeeper/ops-platform/src/main/resources/mapper/TimeTypeMapper.xml


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

@@ -440,6 +440,15 @@
                       <vueCascader :size="'medium'" :widthStr="'430'" :clearable="true && user.userNameNeedTranslate != 1" :subject="option" :subjectId="insertForm.departmentId" :radios="true" :distinction="'2'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1" ></vueCascader>
 
                   </el-form-item>
+                  <el-form-item label="可填报部门" prop="reportDeptIds" v-if="user.timeType.userWithMultiDept">
+                    <template v-if="insertForm.reportDeptIdsList && insertForm.reportDeptIdsList.length > 0"> 
+                      <el-tag v-for="(tag, tagIndex) in insertForm.reportDeptIdsList" :key="tag.id" closable :type="'success'" style="margin-right: 10px;" @close="handleDeptClose(tagIndex)">
+                        <TranslationOpenDataText type='departmentName' :openid='tag.label'></TranslationOpenDataText>
+                      </el-tag>
+                    </template>
+                    <el-link type="primary" :underline="false" @click="addFilldDepartment(insertForm.reportDeptIdsList)">添加</el-link>
+                  </el-form-item>
+
                   <el-form-item label="审核层级" v-if="user.timeType.reportAuditType == 6">
                       <el-radio-group v-model="insertForm.onlyAuditOnce" >
                       <el-radio  :label="0" >两层审核</el-radio>
@@ -809,6 +818,45 @@
           <el-button type="primary" @click="transferActiveMethod">确 定</el-button>
         </span>
       </el-dialog>
+
+      <!-- 多选部门 -->
+      <el-dialog :title="'请选择部门'" :top="'10vh'"  v-if="specialHolidaysDialog" :visible.sync="specialHolidaysDialog" :close-on-click-modal="false" customClass="customWidth" width="600px">
+            <div v-if="user.userNameNeedTranslate == '1'">
+                <el-input placeholder="请输入名字搜索" v-model.trim="wxFilterText" clearable @clear="getWhiteListAll()" class="input-with-select">
+                    <el-button slot="append" icon="el-icon-search" @click="echartDepartment()"></el-button>
+                </el-input>
+            </div>
+            <div class="tree" style="height:400px">
+                <el-scrollbar style="height:100%">
+                    <el-input v-if="user.userNameNeedTranslate != '1'"
+                    :placeholder="$t('keywordfiltering')"
+                    v-model="filterText">
+                    </el-input>
+                <el-tree :data="whiteListAll" show-checkbox :props="defaultProps" node-key="id"
+                    ref="specialHolidaysTree"
+                    highlight-current  :filter-node-method="filterNode">
+                        <span class="custom-tree-node" slot-scope="{ node, data }">
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-if="node.data.children">
+                                    <TranslationOpenDataText type='departmentName' :openid='node.label'></TranslationOpenDataText>
+                                </span>
+                                <span v-else>
+                                    <TranslationOpenDataText type='userName' :openid='node.label'></TranslationOpenDataText>
+                                </span>
+                            </span>
+                            <span v-if="user.userNameNeedTranslate != '1'">
+                                {{ node.label }}
+                            </span>
+                        </span>
+                    </el-tree>
+                </el-scrollbar>
+            </div>
+            <!-- <div>已选中&nbsp;{{chosenMembCount}}&nbsp;人</div>         :default-checked-keys="alreadyPartArray"  @check-change="onTreeItemChange" -->
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="specialHolidaysDialog = false">{{ $t('btn.cancel') }}</el-button>
+                <el-button type="primary" @click="specialHolidaysChange()">{{ $t('btn.determine') }}</el-button>
+            </div>
+        </el-dialog>
     </div>
   </div>
 </template>
@@ -1114,9 +1162,23 @@ export default {
       deleteUserFlg: false,
       deleteUserFlgData: {},
       moveReportUserId: '',
-      deleteUserFlgloading: false
+      deleteUserFlgloading: false,
+
+      // 多选部门
+      filterText: '',
+      wxFilterText: '', // 转译搜索
+      whiteListAll: [],
+      whiteListAllTwo: [],
+      specialHolidaysDialog: false,
     };
   },
+  watch: {
+      filterText(val) {
+        console.log(val)
+        console.log(this.$refs.specialHolidaysTree.filter)
+        this.$refs.specialHolidaysTree.filter(val);
+      }
+  },
   filters: {
     acquireRoleName(value) {
       for (var i in that.acquireRoleList) {
@@ -2766,6 +2828,15 @@ export default {
           (res) => {
             if (res.code == "ok") {
               this.deleteUserFlgData = res.data
+              if(res.data.userReportDeptList && res.data.userReportDeptList.length > 0) {
+                res.data.userReportDeptList = res.data.userReportDeptList .map(item => {
+                  return {
+                    ...item,
+                    label: item.departmentName,
+                    id: item.departmentId
+                  }
+                })
+              }
               this.insertForm = {
                 id: res.data.id,
                 name: res.data.name,
@@ -2789,7 +2860,8 @@ export default {
                 plate4: res.data.plate4,
                 plate5: res.data.plate5,
                 jobNumber: res.data.jobNumber,
-                onlyAuditOnce: res.data.onlyAuditOnce
+                onlyAuditOnce: res.data.onlyAuditOnce,
+                reportDeptIdsList: res.data.userReportDeptList || []
               };
               this.$set(this.insertForm, 'inductionDate', res.data.inductionDate)
               this.getUserCustomConfig(1);
@@ -2922,6 +2994,14 @@ export default {
               ];
           }
 
+          if(this.user.timeType.userWithMultiDept == 1) {
+            let list = []
+            if(this.insertForm.reportDeptIdsList && this.insertForm.reportDeptIdsList.length > 0) {
+              list = this.insertForm.reportDeptIdsList.map(item => item.id)
+            }
+            form.reportDeptIds = list.join(',')
+          }
+
           if (!ssR && trs) {
             this.http.post(
               this.port.manage.insert,
@@ -3775,7 +3855,83 @@ export default {
       error => {
           this.$message({message: error,type: "error"});
       });
-    }
+    },
+    getWhiteListAll(){
+        this.http.post('/department/listAllMemb',{
+        },res => {
+            if(res.code == 'ok'){
+                let list = res.data
+                // this.haveUsersList(list)
+                this.whiteListAll = JSON.parse(JSON.stringify(list))
+                this.whiteListAllTwo = JSON.parse(JSON.stringify(list))
+            }
+        },error => {})
+    },
+    // 企业微信选人搜索
+    echartDepartment() {
+        if(this.wxFilterText != '') {
+            this.http.post("/department/listAllMemb", {
+                keyword: this.wxFilterText,
+                cursor: ''
+            },
+            res => {
+                if (res.code == "ok") {
+                    if(!Array.isArray(res.data)) {
+                        let list = res.data.data
+                        // this.haveUsersList(list)
+                        this.whiteListAll = JSON.parse(JSON.stringify(list))
+                        this.whiteListAllTwo = JSON.parse(JSON.stringify(list))
+                    } else {
+                        this.whiteListAll = []
+                    }
+                }
+            },
+            error => { });
+        } else {
+            this.getWhiteListAll()
+        }
+    },
+    haveUsersList(list){
+        for (var i in list) {
+            if (list[i].children != null) {
+                this.haveUsersList(list[i].children);
+            }
+            if (list[i].userList != null) {
+                if (list[i].children == null) {
+                    list[i].children = [];
+                }
+                list[i].userList.forEach(element => {
+                    var obj = {id: element.id, label:element.name, parentId:element.departmentId, isUser:1};
+                    list[i].children.push(obj);
+                });
+            }
+        }
+    },
+    specialHolidaysChange() {
+      let selectList = this.$refs.specialHolidaysTree.getCheckedNodes();
+      this.specialHolidaysDialog = false
+      this.insertForm.reportDeptIdsList = selectList
+    },
+    addFilldDepartment(item) {
+        this.filterText = ''
+        this.wxFilterText = ''
+        this.whiteListAll = JSON.parse(JSON.stringify(this.whiteListAllTwo));
+        this.specialHolidaysDialog = true
+        if(item) {
+          let key = item.map(item => item.id)
+          console.log(key, '<=== key')
+          setTimeout(() => {
+            this.$refs.specialHolidaysTree.setCheckedKeys(key)
+          }, 500)
+        }
+    },
+    handleDeptClose(index) {
+      this.insertForm.reportDeptIdsList.splice(index, 1)
+    },
+    filterNode(value, data) {
+        if (!value) return true;
+        return data.label.indexOf(value) !== -1;
+    },
   },
   mounted() {
     this.deactiveDate = util.formatDate.format(new Date(), "yyyy-MM-dd");
@@ -3794,6 +3950,7 @@ export default {
       this.getWxManager()
     }
     this.statesPush();
+    this.getWhiteListAll()
     // 获取企业微信的参数
     // if(this.user.companyId == '1081' || this.user.companyId == '7') {
     //   this.agentConfig()