QuYueTing 1 неделя назад
Родитель
Сommit
d63f61742f

Разница между файлами не показана из-за своего большого размера
+ 0 - 3420
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java~


Разница между файлами не показана из-за своего большого размера
+ 106134 - 14560
fhKeeper/formulahousekeeper/management-platform/workTime.log


+ 139 - 10
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -385,13 +385,27 @@
                             <i class="el-icon-question" style="color:#606266"></i>
                         </el-tooltip>
                     </span>
-                    <el-select v-model="depForm.auditorIds" filterable v-if="user.userNameNeedTranslate != '1'" clearable multiple style="width: 100%" placeholder="请选择加班审核人">
-                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
-                          <span style="float: left">{{ item.name }}</span>
-                          <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
-                        </el-option>
-                    </el-select>
-                    <selectCat :subject="users" :subjectId="depForm.auditorIds" :size="'medium'" :filterable="true" :widthStr="'430'" :multiSelect="true" v-if="user.userNameNeedTranslate == '1' && departmentVisible" :distinction="'40'" :clearable="true" @selectCal="selectCal"></selectCat>
+                    <div style="display: flex; flex-wrap: wrap; align-items: center; gap: 4px;">
+                        <template v-for="(auditor, index) in depForm.auditorList">
+                            <el-tag
+                                :key="auditor.id"
+                                closable
+                                type="info"
+                                @close="removeAuditor(index)"
+                                style="cursor: default;">
+                                <span v-if="user.userNameNeedTranslate == '1'"><TranslationOpenDataText type='userName' :openid='auditor.name'></TranslationOpenDataText></span>
+                                <span v-else>{{ auditor.name }}</span>
+                            </el-tag>
+                            <span v-if="index < depForm.auditorList.length - 1" :key="'arrow-' + index" style="color: #909399; font-size: 14px; margin: 0 2px;">→</span>
+                        </template>
+                        <el-button
+                            type="primary"
+                            icon="el-icon-plus"
+                            size="mini"
+                            circle
+                            @click="openAuditorSelectDialog">
+                        </el-button>
+                    </div>
                 </el-form-item>
                 <!-- 直属领导 -->
                 <el-form-item :label="$t('leadership')" prop="reportAuditUserid" v-if="user.timeType.needDeptAudit">
@@ -890,6 +904,41 @@
         </span>
       </el-dialog>
 
+      <!-- 加班审核人选择弹窗 -->
+      <el-dialog title="选择加班审核人" :visible.sync="auditorSelectDialog" width="450px" append-to-body>
+        <div>
+          <!-- 非企业微信转译:使用 el-select 单选 -->
+          <el-select
+            v-if="user.userNameNeedTranslate != '1'"
+            v-model="selectedAuditorId"
+            filterable
+            clearable
+            :placeholder="$t('defaultText.pleaseChoose')"
+            style="width: 100%">
+            <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id">
+              <span style="float: left">{{ item.name }}</span>
+              <span style="float: right; color: #8492a6; font-size: 13px">{{ item.jobNumber }}</span>
+            </el-option>
+          </el-select>
+          <!-- 企业微信转译:使用 selectCat 组件 -->
+          <selectCat
+            v-if="user.userNameNeedTranslate == '1'"
+            :size="'medium'"
+            :filterable="true"
+            :clearable="true"
+            :widthStr="'360'"
+            :subject="users"
+            :subjectId="selectedAuditorId"
+            :distinction="'50'"
+            @selectCal="selectCal">
+          </selectCat>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="auditorSelectDialog = false">{{ $t('btn.cancel') }}</el-button>
+          <el-button type="primary" @click="confirmAuditorSelect" v-if="user.userNameNeedTranslate != '1'">{{ $t('btn.determine') }}</el-button>
+        </span>
+      </el-dialog>
+
       <el-dialog
         :title="$t('zhuanYiDao')"
         :visible.sync="transferActiveDialogFlag"
@@ -1264,8 +1313,19 @@ export default {
       userGroupId: '',
       userGroupVisable: false,
       userGroupLoading: false,
+
+      // 加班审核人选择弹窗
+      auditorSelectDialog: false,
+      auditorSearchKeyword: '',
+      selectedAuditorId: null,
     };
   },
+  computed: {
+    filteredAuditorUsers() {
+      if (!this.auditorSearchKeyword) return this.users;
+      return this.users.filter(u => u.name && u.name.indexOf(this.auditorSearchKeyword) !== -1);
+    }
+  },
   watch: {
       filterText(val) {
         console.log(val)
@@ -3355,7 +3415,9 @@ export default {
             name: null,
             parentId: null,
             managerId: null,
-            isEnableMulti: 0
+            isEnableMulti: 0,
+            auditorList: [],
+            auditorIds: []
           };
           if (that.depData.id != -1 && that.depData.id != 0) {
             that.depForm.parentId = that.depData.id;
@@ -3368,7 +3430,9 @@ export default {
             name: null,
             parentId: null,
             managerId: null,
-            isEnableMulti: 0
+            isEnableMulti: 0,
+            auditorList: [],
+            auditorIds: []
           };
           that.depTitle = this.$t('addsubdepartment');
         } else {
@@ -3412,6 +3476,19 @@ export default {
                     });
                   }
                   this.$set(that.depForm, 'auditorIds', res.data.auditorIds);
+                  // 初始化 auditorList(用于 tag 展示)
+                  if (res.data.auditorIds) {
+                    const ids = Array.isArray(res.data.auditorIds)
+                      ? res.data.auditorIds
+                      : String(res.data.auditorIds).split(',').filter(Boolean);
+                    const list = ids.map(id => {
+                      const u = that.users.find(u => String(u.id) === String(id));
+                      return u ? { id: u.id, name: u.name } : { id: id, name: id };
+                    });
+                    that.$set(that.depForm, 'auditorList', list);
+                  } else {
+                    that.$set(that.depForm, 'auditorList', []);
+                  }
                 } 
               },
               (error) => {
@@ -3896,6 +3973,24 @@ export default {
         this.transferActive.takeoverId = obj.id
       } else if (obj.distinction == '6') {
         this.insertForm.superiorId = obj.id;
+      } else if (obj.distinction == '50') {
+        // 企业微信转译模式下,加班审核人选择回调
+        if (!obj.id) return;
+        const auditorList = this.depForm.auditorList || [];
+        const alreadyExists = auditorList.some(a => a.id === obj.id);
+        if (alreadyExists) {
+          this.$message({ message: '该审核人已在列表中', type: 'warning' });
+          return;
+        }
+        const user = this.users.find(u => u.id === obj.id);
+        if (user) {
+          if (!this.depForm.auditorList) {
+            this.$set(this.depForm, 'auditorList', []);
+          }
+          this.depForm.auditorList.push({ id: user.id, name: user.name });
+          this.depForm.auditorIds = this.depForm.auditorList.map(a => a.id);
+        }
+        this.auditorSelectDialog = false;
       }
     },
     // 企业微信可见范围设置
@@ -4098,7 +4193,41 @@ export default {
         }
       },
       error => { this.userGroupLoading = false });
-    }
+    },
+    // 打开加班审核人选择弹窗
+    openAuditorSelectDialog() {
+      this.selectedAuditorId = null;
+      this.auditorSearchKeyword = '';
+      this.auditorSelectDialog = true;
+    },
+    // 确认选择加班审核人
+    confirmAuditorSelect() {
+      if (!this.selectedAuditorId) {
+        this.$message({ message: '请选择一位审核人', type: 'warning' });
+        return;
+      }
+      const auditorList = this.depForm.auditorList || [];
+      const alreadyExists = auditorList.some(a => a.id === this.selectedAuditorId);
+      if (alreadyExists) {
+        this.$message({ message: '该审核人已在列表中', type: 'warning' });
+        return;
+      }
+      const user = this.users.find(u => u.id === this.selectedAuditorId);
+      if (user) {
+        if (!this.depForm.auditorList) {
+          this.$set(this.depForm, 'auditorList', []);
+        }
+        this.depForm.auditorList.push({ id: user.id, name: user.name });
+        // 同步 auditorIds
+        this.depForm.auditorIds = this.depForm.auditorList.map(a => a.id);
+      }
+      this.auditorSelectDialog = false;
+    },
+    // 删除加班审核人
+    removeAuditor(index) {
+      this.depForm.auditorList.splice(index, 1);
+      this.depForm.auditorIds = this.depForm.auditorList.map(a => a.id);
+    },
   },
   mounted() {
     this.deactiveDate = util.formatDate.format(new Date(), "yyyy-MM-dd");

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

@@ -473,7 +473,7 @@
                         <span v-if="user.companyId==5978" style="margin-left:5px;" class="themeFontColor"><i class="el-icon-warning"></i>{{$t('other.kaoqingTimeTip')}}</span>
 
                         <!--针对羲和超导的异常填报功能-->
-                        <template v-if="(user.companyId == 8555 || user.companyId ==5792 ) && (!workForm.time || !workForm.time.workHours)">
+                        <template v-if="(user.companyId == 8555 || user.companyId ==5792)">
                             <span style="margin-left:70px;color:#666;">异常填报</span>
                             <el-switch v-model="workForm.abnormalTime" :disabled="!canEdit"></el-switch>
                         </template>

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

@@ -64,7 +64,7 @@
                             style="height:0.6rem;padding:0 0.16667rem;" :loading="cardRefLoading" loading-size="0.26667rem"
                             @click.stop.native="cardtimeRefresh(form.createDate, (fillingAgent.id || ''))"
                             v-if="substitute && fillingAgent.name && (user.timeType.syncDingding == 1 || user.timeType.syncCorpwxTime == 1)"></van-button>
-                            <template v-if="user.companyId == 8555 && (!report.time || !report.time.workHours)">
+                            <template v-if="user.companyId == 8555 || user.companyId == 5792">
                                 <span style="margin:0 10px;color:#DAA520;">异常填报</span>
                                 <van-switch v-model="form.abnormalTime" size="20px" :disabled="!canEdit" @change="$forceUpdate()"/>
                             </template>
@@ -531,7 +531,7 @@
                             <span :class="item.canEdit ? 'overListTime' : 'overListTime hoveOver'">小时</span>
                         </div>
                         <!--羲合超导的照片上传-->
-                        <template v-if="user.companyId == 8555">
+                        <template v-if="user.companyId == 8555 || user.companyId == 5792">
                             <van-tag style="position:absolute;right:10px;" v-if="form.abnormalTime && item.canEdit" type="primary"
                             size="large" @click="takePhoto(index)">图片上传</van-tag>
                         </template>
@@ -2034,7 +2034,7 @@ export default {
                             let array = [];
                             var abnormalTime = false;
                             for (var i in list) {
-                                if (this.user.companyId == 8555) {
+                                if (this.user.companyId == 8555 || user.companyId == 5792) {
                                     if (list[i].extraField1) {
                                         abnormalTime = true;
                                     }
@@ -3041,7 +3041,7 @@ export default {
             }
             //非代填情况下要校验考勤
             if (!this.substitute) {
-                if ((this.user.companyId == 8555) && this.form.abnormalTime) {
+                if ((this.user.companyId == 8555 || user.companyId == 5792) && this.form.abnormalTime) {
                     //异常上报情况,需要上传图片
                     var findImg = false;
                     for (var t=0;t<this.form.domains.length; t++) {
@@ -3361,7 +3361,7 @@ export default {
                     formData.append('extraField5', this.form.domains[i].extraField5 || '');
                 }
                 //羲合超导的异常工时上报
-                if (this.user.companyId == 8555) {
+                if (this.user.companyId == 8555 || user.companyId == 5792) {
                     formData.append("abnormalTime", this.form.abnormalTime);
                 }
             }