Browse Source

工时管家组织机构新增字段,基础设施调整

Lijy 3 years ago
parent
commit
784feb221c

+ 23 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -205,7 +205,16 @@
                     </el-form>
                 </div>
             </el-col>
-        </el-row>        <div style="width:80px;margin:0 auto;padding:20px;">
+        </el-row>
+        
+        <!-- 是否开启导入审核 -->
+        <div class="yanjiu">
+            <p style="margin-left:10px;color:#666;">是否开启导入审核</p>
+            <el-switch style="margin-left: 55px" v-model="timeType.needDeptAudit" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+        </div>
+
+
+        <div style="width:80px;margin:0 auto;padding:20px;">
             <el-button  type="primary" @click="submitInsert" :loading="addLoading">保存</el-button>
         </div>
         <!-- 维护数据 -->
@@ -267,6 +276,7 @@
                 pm: 4,
                 type: 0},
                 customDegreeActive: false,
+                needDeptAudit: false,
                 customDegreeName: '',
                 rules: {
                     allday: [{ required: true, message: "请选择全天工作时长", trigger: "blur" }],
@@ -413,6 +423,11 @@
                 } else {
                     this.timeType.customDegreeActive = true
                 }
+                if(this.timeType.needDeptAudit == 0) {
+                    this.timeType.needDeptAudit = false
+                } else {
+                    this.timeType.needDeptAudit = true
+                }
                 // this.customDegreeName = this.timeType.customDegreeName
             },
             initTime() {
@@ -427,6 +442,12 @@
                 this.$refs.form1.validate(valid => {
                     if (valid) {
                         var spl = this.timeType.customDegreeActive
+                        var sss = this.timeType.needDeptAudit
+                        if(this.timeType.needDeptAudit) {
+                            this.timeType.needDeptAudit = 1
+                        } else {
+                            this.timeType.needDeptAudit = 0
+                        }
                         if(this.timeType.customDegreeActive) {
                             this.timeType.customDegreeActive = 1
                         } else {
@@ -441,6 +462,7 @@
                                         type: "success"
                                     });
                                     this.timeType.customDegreeActive = spl
+                                    this.timeType.needDeptAudit = sss
                                 } else {
                                     this.$message({
                                         message: res.msg,

+ 26 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -125,11 +125,18 @@
                 <el-form-item label="部门名称" prop="name">
                     <el-input v-model="depForm.name" placeholder="请输入部门名称" clearable></el-input>
                 </el-form-item>
+
                 <el-form-item label="负责人" prop="managerId">
                     <el-select v-model="depForm.managerId" filterable  clearable  placeholder="请选择部门负责人" >
                         <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>
+                <!-- 部门审核人 -->
+                <el-form-item label="部门审核" prop="reportAuditUserid">
+                    <el-select v-model="depForm.reportAuditUserid" filterable  clearable  placeholder="请选择部门审核人" >
+                        <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                    </el-select>
+                </el-form-item>
             </el-form>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="departmentVisible = false">取消</el-button>
@@ -979,6 +986,7 @@
                             label: '未分配',
                         })
                         this.data = list;
+                        console.log(list, "部门数据")
                         this.option = this.changeArr(list1);
                     } else {
                         this.$message({
@@ -1045,12 +1053,22 @@
                     }
                     this.depTitle = "新增部门";
                 } else {
+                    if(this.depData.managerId == "null") {
+                        this.depData.managerId = ''
+                    }
+                    if(this.depData.reportAuditUserid == "null") {
+                        this.depData.reportAuditUserid = ''
+                    }
                     this.depForm = {
                         id: this.depData.id,
                         name: this.depData.label,
                         parentId: this.depData.parentId,
                         managerId: this.depData.managerId,
+                        reportAuditUserid: this.depData.reportAuditUserid
                     }
+                    // if(this.depData.reportAuditUserid != null && this.depData.reportAuditUserid != "null" && this.depData.reportAuditUserid.length > 0) {
+                    //     this.depForm.reportAuditUserid = this.depData.reportAuditUserid
+                    // }
                     this.depTitle = "编辑部门";
                 }
                 this.departmentVisible = true;
@@ -1070,6 +1088,14 @@
                         }
                         if (this.depForm.managerId != null) {
                             form.managerId = this.depForm.managerId
+                        } else {
+                            form.managerId = "null"
+                        }
+                        console.log(this.depForm)
+                        if (this.depForm.reportAuditUserid != null && this.depForm.reportAuditUserid != "") {
+                            form.reportAuditUserid = this.depForm.reportAuditUserid
+                        } else {
+                            form.reportAuditUserid = "null"
                         }
                         this.http.post( this.depForm.id==null?this.port.manage.add:this.port.manage.edit, form,
                         res => {

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

@@ -72,7 +72,7 @@
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,0)">填写日报</el-link>
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,0)">代填日报</el-link>
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=false;fillInReport(-1,1)">批量填报</el-link>
-                            <el-link type="primary" v-if="user.role==1||user.role==2||user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="importWxDialog=true">工时导入</el-link>
+                            <el-link type="primary" v-if="user.role==1||user.role==2||user.manageDeptId != 0" style="margin-right:10px;" :underline="false" @click="imports()">工时导入</el-link>
                             
                             <!-- <el-link type="primary" style="margin-right:10px;" :underline="false" @click="isSubstitude=true; fillInReport(-1,1)">批量代填</el-link> -->
                             <el-link type="primary" style="margin-right:10px;" :underline="false" @click="showExportDialog">导出日报</el-link>
@@ -813,7 +813,8 @@
                 weidu: [],
                 weiduList: [],
                 yonghuUser: [],
-                dateAr: []
+                dateAr: [],
+                batchSubFillDialog: false
             };
         },
         methods: {
@@ -2710,6 +2711,15 @@
             },
             cli() {
                 
+            },
+            // 判断是展示那个工时导入
+            imports() {
+                console.log(this.user.timeType.syncCorpwxTime)
+                if(this.user.timeType.syncCorpwxTime == 0) {
+                    this.importDialog = true
+                } else {
+                    this.importWxDialog = true
+                }
             },
             // 跳转
             junpToDeskTop(id) {