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

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

seyason 3 роки тому
батько
коміт
11c43e726b

+ 279 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -37,6 +37,13 @@
                 <span slot="title">请假统计</span>
               </template>
           </el-menu-item>
+
+          <el-menu-item index="5" v-if="user.role != 0">
+              <template slot="title">
+                <i class="iconfont firerock-iconliucheng"></i>
+                <span slot="title">请假审批流程</span>
+              </template>
+          </el-menu-item>
           </el-menu>
       </el-col>
     </div>
@@ -242,7 +249,7 @@
     </div>
 
     <!-- 统计部分 -->
-    <div v-if="displayTable && apk" class="tops">
+    <div v-if="displayTable && apk && apk2 == false" class="tops">
       <!-- 公共 -->
         <div class="ctons">
           <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
@@ -305,6 +312,71 @@
           </div>
         </div>
     </div>
+
+    <div v-if="displayTable && apk && apk2" class="tops">
+        
+        <div class="ctons">
+        <el-col :span="6" >
+            <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
+            <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
+                <el-tree :data="sdata" :props="sdefaultProps" @node-click="handleNodeClick" accordion></el-tree>
+            </div>
+            </el-scrollbar>
+        </el-col>
+        <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">设置 &lt;<span style="color:#20a0ff;">{{depData.label}}&gt;</span> 直属人员请假审批流程
+                    <el-tooltip effect="dark" v-if="depData != null && depData.children!=null" content="仅适用于当前部门的直属人员,子部门人员的审批流程需要单独设置" placement="top-start">
+                    <i class="el-icon-question"></i>
+                    </el-tooltip>
+                </div>
+                <div style="padding:5px;" v-if="depData == null">请选择部门</div>
+                <div style="width:100%;margin:0 auto;text-align: center; margin-top:50px;" v-if="depData != null">
+                    <span>员工填报</span>
+                    <icon class="iconfont firerock-iconright"></icon>
+                    <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(0)"></icon>
+                    <icon class="iconfont firerock-iconright"></icon>
+                    <span v-for="(item, index) in dataArray" :key="item.seq" >
+                        
+                        <el-button type="primary" v-if="item.auditorType == 1" @click="editNodeDialog(index, item)">{{item.auditDeptName}}</el-button>
+                        <el-button type="primary" v-if="item.auditorType == 0" >项目负责人</el-button>
+                        <el-button type="primary" v-if="item.auditorType == 2" @click="editNodeDialog(index, item)">{{item.userName}}</el-button>
+                        <icon class="iconfont firerock-iconright"></icon>
+                        <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(index+1)"></icon>
+                        <icon class="iconfont firerock-iconright"></icon>
+                    </span>
+
+                    <!--结束点 -->
+                    <icon class="iconfont firerock-iconApp_New_Line" style="color:#20A0FF;"></icon>
+                    审批完成
+                </div>
+
+                <div style="width:100%;margin:0 auto;margin-bottom:30px;position: absolute;bottom: 0px;text-align: center; ">
+                    <el-button type="primary" @click="submitInsert" :loading="addLoading">保存</el-button>
+                </div>
+            </div>
+            </el-scrollbar>
+            
+        </el-col>
+        </div>
+
+        <!--部门选择列表 -->
+        <el-dialog  title="请选择审批人" v-if="dialogVisible" :visible.sync="dialogVisible"  width="460px">
+              <el-form label-width="140px">
+              <el-form-item label="选择部门/指定人员" >
+                  <el-cascader filterable ref="deptCascader"  v-model="curDeptId" placeholder="请选择部门/指定人员" style="width: 100%" @change="chooseDept"
+                    :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
+              </el-form-item>
+              </el-form>
+            <div slot="footer" class="dialog-footer">
+              <el-button type="default" @click="deleteNode" v-if="!isAdd" style="float:left;">删除</el-button>
+                <el-button type="primary" @click="addNode" >确定</el-button>
+            </div>
+        </el-dialog>
+
+    </div>
+
   </div>
   <!-- 请假单详情 -->
   <el-dialog title="请假单详情" :visible.sync="dialog" width="1000px" @close="bangd()">
@@ -505,18 +577,206 @@ export default {
       dialog: false,
       adform: {},
       affId: '',
-      qjType: [{name: '事假',id: 0},{name: '病假',id: 1},{name: '年假',id: 2},{name: '产假',id: 3},{name: '婚假',id: 4},{name: '丧假',id: 5},{name: '调休假',id: 6},{name: '陪产假',id: 7},{name: '其他', id: 8}]
+      qjType: [{name: '事假',id: 0},{name: '病假',id: 1},{name: '年假',id: 2},{name: '产假',id: 3},{name: '婚假',id: 4},{name: '丧假',id: 5},{name: '调休假',id: 6},{name: '陪产假',id: 7},{name: '其他', id: 8}],
+      // 
+      apk2: false,
+      sdata:[],
+      dataArray:[],
+      sdefaultProps: {
+          children: 'children',
+          label: 'label'
+      },
+      depData: null,
+      isAdd : false,
+      sindex : 0,
+      curDeptId : null,
+      curUserId : null,
+      dialogVisible: false,
+      soption : null,
+      susers: []
+
+      // 
     };
   },
   computed: {},
   watch: {},
-  created() {},
+  created() {
+    let height = window.innerHeight;
+            this.tableHeight = height - 195;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 195;
+            };
+  },
 
   mounted() {
     this.getUsers() // 获取人员信息
+    this.getDepartment();
   },
   filters: {},
   methods: {
+
+    handleNodeClick(data) {
+                if(this.depData == null || data.id != this.depData.id) {
+                    this.depData = data;
+                    console.log("depdata",this.depData);
+                    this.getSettings();
+                }
+            },
+
+    getSettings() {
+                this.http.post('/audit-workflow-setting/get',{deptId: this.depData.id},
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.dataArray = res.data;
+                            console.log("请求1",res.data);
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+            },
+    // 获取部门列表
+    getDepartment() {
+                this.http.post( this.port.manage.depList, {},
+                res => {
+                    if (res.code == "ok") {
+                        var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
+                        this.sdata = list;
+                        this.soption = [
+                          {value: 1 , label : "部门" , children : this.changeArr(list1)},
+                          {value: 2 , label : "指定人员",children : this.susers}
+                        ]
+                        console.log("列表",this.soption);
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+    changeArr(arr) {
+                for (var i = 0; i < arr.length; i++) {
+                    if(arr[i].id != -1 && arr[i].id != 0) {
+                        if (arr[i].children != null && arr[i].children.length>0) {
+                            arr[i].children = this.changeArr(arr[i].children);
+                        }
+                        arr[i].id && (arr[i].value = arr[i].id);
+                        delete arr[i].id;
+                    }
+                }
+                for(var i in arr) {
+                    if(arr[i].id == -1 || arr[i].id == 0) {
+                        arr.splice(i,1)
+                    }    
+                }
+                return arr;
+            },
+    showNodeDialog(index) {
+              this.isAdd = true;
+              this.sindex = index;
+              this.curDeptId = null;
+              this.curUserId = null;
+              this.dialogVisible = true;
+            },
+    editNodeDialog(index, item) {
+                //检查是否可编辑
+                this.http.post('/audit-workflow-setting/checkNodeInUse',{auditDeptId: item.auditDeptId, deptId: this.depData.id},
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.isAdd = false;
+                            this.sindex = index;
+                            this.curUserId = item.userId;
+                            this.dialogVisible = true;
+                            this.curDeptId = item.auditDeptId;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                
+            },
+    addNode() {
+              this.dialogVisible = false;
+              if (this.curDeptId == null) return;
+              var node = this.$refs.deptCascader.getCheckedNodes()[0];
+              console.log("node",node);
+              
+              if (this.isAdd) {
+                if(node.path[0] == 1){
+                  var node = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
+                }else if(node.path[0] == 2){
+                  var node = {userId: node.value, userName: node.label, auditorType: 2};
+                }
+                this.dataArray.splice(this.sindex, 0, node);
+                
+              } else {
+                //编辑
+                this.dataArray[this.sindex].auditDeptId = node.value;
+                this.dataArray[this.sindex].auditDeptName = node.label;
+              }
+            },
+    deleteNode() {
+                this.dialogVisible = false;
+                this.dataArray.splice(this.sindex, 1);
+            },
+    submitInsert() {
+                this.http.post('/audit-workflow-setting/add',{json:JSON.stringify(this.dataArray), deptId: this.depData.id},
+                            res => {
+                                this.listLoading = false;
+                                if (res.code == "ok") {
+                                    this.$message({
+                                        message: '保存成功',
+                                        type: "success"
+                                    });
+                                } else {
+                                    this.$message({
+                                        message: res.msg,
+                                        type: "error"
+                                    });
+                                }
+                            },
+                            error => {
+                                this.listLoading = false;
+                                this.$message({
+                                    message: error,
+                                    type: "error"
+                                });
+                                }
+                            );
+            },
+    
+    // 
     approve(item) {
       //审核通过
       this.http.post('/leave-sheet/approve', {id:item.id
@@ -568,6 +828,9 @@ export default {
         res => {
             if (res.code == "ok") {
                 this.users = res.data.records;
+                for (let i = 0; i < this.users.length; i++) {
+                  this.susers.push({value:this.users[i].id,label:this.users[i].name})
+                }
                 if (this.user.role == 0) {
                     this.addForm.ownerId = this.user.id;
                     this.ownerIds = this.user.id
@@ -594,15 +857,21 @@ export default {
       this.addForm.leaveType = index
     },
     staffs(key, keyPath) {
-      console.log(keyPath)
+      console.log("keypath",keyPath)
       if (keyPath[0] == '1') {
         this.displayTable = false;
         this.apk = false
       } else if(keyPath[0] == '2' || keyPath[0] == '3') {
         this.displayTable = true;
         this.apk = false
+      } else if(keyPath[0] == '4'){
+        this.displayTable = true;
+        this.apk = true
+        this.apk2 = false
+        this.statistical()
       } else {
         this.displayTable = true;
+        this.apk2 = true
         this.apk = true
         this.statistical()
       }
@@ -987,6 +1256,12 @@ export default {
 };
 </script>
 <style scoped>
+.addNode {
+  cursor:pointer;
+}
+.addNode:hover {
+  color:#20a0ff;
+}
 .apls {
   width: 200px;
   white-space:nowrap;

+ 71 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/finance.vue

@@ -34,9 +34,51 @@
             <el-form-item style="float:right;" v-if="(user.role == 1 || user.role == 2 || user.role == 4) && user.timeType.financeAudit == '1'">
                 <el-link type="primary" :underline="false" @click="reviewerVisible = true">设置审核人</el-link>
             </el-form-item>
+            <el-form-item style="float:right;" v-if="(user.role == 1 || user.role == 2 || user.role == 4) && user.timeType.financeAudit == '1'">
+                <el-link type="primary" :underline="false" @click="xzjl(),xzImportVisible = true">上传记录</el-link>
+            </el-form-item>
             </el-form>
         </el-col>
-
+        <!-- 上传记录 -->
+        <el-dialog title="薪资上传记录" :visible.sync="xzImportVisible" width="1100px" :before-close="handleClose">
+            <div>
+                <el-table :data="xzList" style="width: 100%" :height="400">
+                    <el-table-column prop="userName" label="操作人"></el-table-column>
+                    <el-table-column prop="ymonth" label="所属月份"></el-table-column>
+                    <el-table-column prop="fileName" label="文件名">
+                        <template slot-scope="scope">
+                            <div>
+                                <el-link type="primary" @click="downloadByA({name:scope.row.fileName,url:scope.row.serverName})"> {{scope.row.fileName}}</el-link>
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="recoverReport" label="是否覆盖日报成本" width="150">
+                        <template slot-scope="scope">
+                            <div>
+                                {{scope.row.recoverReport == 1? '是' : '否'}}
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="recoverMonthcost" label="是否覆盖人员月成本" width="150">
+                        <template slot-scope="scope">
+                            <div>
+                                {{scope.row.recoverMonthcost == 1? '是' : '否'}}
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="indate" label="上传时间"></el-table-column>
+                    <!-- <el-table-column prop="date" label="操作" v-if="(tabPosition == 1 || tabPosition == 0) && (reviewerRuleForm.auditorId == user.id || user.role == 1 || user.role == 2)">
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button type="primary" size="small" v-if="tabPosition == 0" @click="operationList(0, scope.row.id)">通过</el-button>
+                                <el-button type="warning" size="small" v-if="tabPosition == 0" @click="operationList(1, scope.row.id)">驳回</el-button>
+                                <el-button type="warning" size="small" v-if="tabPosition == 1" @click="operationList(2, scope.row.id)">撤销</el-button>
+                            </div>
+                        </template>
+                    </el-table-column> -->
+                </el-table>
+            </div>
+        </el-dialog>
         <!-- 财务报表审核 -->
         <el-dialog :title="shenhe" :visible.sync="importVisible" width="1100px" :before-close="handleClose">
             <div>
@@ -414,7 +456,9 @@ import { error } from 'dingtalk-jsapi';
                 people: [],
                 revaelse: '',
                 reviewLis: [],
-                ovReviewLis: []
+                ovReviewLis: [],
+                xzImportVisible: false,
+                xzList: []
             };
         },
         methods: {
@@ -1214,6 +1258,31 @@ import { error } from 'dingtalk-jsapi';
                         type: "error"
                     });
                 });
+            },
+            // 获取薪资上传记录
+            xzjl() {
+                this.http.post('/finance-import/list', {
+                    companyId: this.user.companyId,
+                    // pageIndex:1,
+                    // pageSize: 9999
+                },
+                res => {
+                    if (res.code == "ok") {
+                       console.log('123',res.data)
+                       this.xzList = res.data.passList
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
             }
 
         },

+ 9 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -42,12 +42,17 @@
                     </el-table-column>
                     <el-table-column prop="name" label="任务名称" sortable width="330">
                         <template slot-scope="scope">
-                            <el-popover trigger="hover" placement="top" width="330" v-if="scope.row.name">
-                            <p id="caseContent">{{scope.row.name}}</p>
-                            <div slot="reference" class="name-wrapper">
+                            <div v-if="scope.row.name.length > 20">
+                                <el-popover trigger="hover" placement="top" width="330" v-if="scope.row.name">
+                                    <p id="caseContent">{{scope.row.name}}</p>
+                                    <div slot="reference" class="name-wrapper">
+                                        <div class="cal" @click="editTask(scope.row)">{{scope.row.name}}</div>
+                                    </div>
+                                </el-popover>
+                            </div>
+                            <div v-else>
                                 <div class="cal" @click="editTask(scope.row)">{{scope.row.name}}</div>
                             </div>
-                            </el-popover>
                         </template>
                     </el-table-column>
                     

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

@@ -3,13 +3,21 @@
         <!--列表-->
         <div>
             <el-card class="box-card daily" shadow="never">
-                <div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">
-                    <div class="jjk" style="display:inline-block;position:fixed;top:70px;background:#fff;left:250px;">
+                <div style="position: relative;margin-top: -20px;margin-bottom: 20px">
+                <!-- <div class="jjk" style="display:inline-block;position:fixed;top:70px;background:#fff;left:250px;"> -->
+                <div class="jjk" style="display:inline-block;position:absolute;top:10px;background:#fff;left:0px;">
                         <el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
                          style="width:190px;"
                          @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
                          <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini"  @click="showWorkTime"></el-button>
                     </div>
+                <div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">
+                    <!-- <div class="jjk" style="display:inline-block;position:fixed;top:70px;background:#fff;left:250px;">
+                        <el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
+                         style="width:190px;"
+                         @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
+                         <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini"  @click="showWorkTime"></el-button>
+                    </div> -->
                         <span v-for="(item,index) in allDate" :id="'day'+index" :class="index==choseDay?'chooseDate date_item':'date_item'" 
                         @click="choseDate(index, item)" :key="index" >
                         <div :style="'display:inline-block;'+(item.state == null?'padding:0px 6px;':'')" >
@@ -20,6 +28,7 @@
                         <i v-if="item.state != null" class="iconfont firerock-icondot" :class="statusStyle[item.state]"></i>
                         </span>
                 </div>
+                </div>
                 <div style="display:flex;">
                 <div v-if="user.role > 0 || user.manageDeptId != 0" >
                     <div style="width:190px;">