ソースを参照

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

山水共长天一色 3 年 前
コミット
ecc71bd85b

+ 10 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -58,27 +58,27 @@
                     {{scope.row.inchargerName}}
                   </template>
                 </el-table-column>
-                <el-table-column prop="contractAmount" label="合同金额(元)"  width="150" align="right">
+                <el-table-column prop="contractAmount" label="合同金额(元)" align="right">
                   <template slot-scope="scope">
                         {{scope.row.contractAmount.toFixed(2)}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="status" label="状态" width="80" >
+                <el-table-column prop="status" label="状态" >
                     <template slot-scope="scope">
                         {{scope.row.status == null?"-":statusTxt[scope.row.status]}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="planStartDate" label="计划开始时间"  width="120">
+                <el-table-column prop="planStartDate" label="计划开始时间" >
                     <template slot-scope="scope">
                         {{scope.row.planStartDate}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="planEndDate" label="计划结束时间"  width="120">
+                <el-table-column prop="planEndDate" label="计划结束时间">
                     <template slot-scope="scope">
                         {{scope.row.planEndDate}}
                     </template>
                 </el-table-column>
-                <el-table-column prop="progress" label="完成度" width="100"  >
+                <el-table-column prop="progress" label="完成度">
                     <template slot-scope="scope">
                         {{scope.row.progress==null?"-":scope.row.progress}}%
                     </template>
@@ -270,7 +270,7 @@
             highlight-current-row v-loading="listLoading" :height="tableHeight" 
              style="width: 100%;">
                 <el-table-column prop="projectCode" label="项目编号"  width="120" fixed ></el-table-column>
-                <el-table-column prop="projectName" label="项目名称" width="450" fixed  >
+                <el-table-column prop="projectName" label="项目名称" width="240" fixed  >
                   <template slot-scope="scope" >
                     {{scope.row.projectName}}
                   </template>
@@ -292,7 +292,10 @@
                     <el-option v-for="(item, index) in proList" :key="index" :label="item.projectName" :value="item.id" @change="selscts(item)"></el-option>
                   </el-select> -->
                   <el-select v-model="proJuctId" placeholder="请选择项目" @change="selcts()" clearable filterable>
-                    <el-option v-for="(item, index) in proListOvertime" :key="index" :label="item.projectName" :value="item.id" @change="selscts(item)"></el-option>
+                    <el-option v-for="(item, index) in proListOvertime" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @change="selscts(item)">
+                      <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+                      <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+                    </el-option>
                   </el-select>
                 </div>
                 <div class="bianju">

+ 20 - 34
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -85,9 +85,9 @@
       <!-- <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits('addFormRules')" size="mini">提交</el-button></p> -->
     </div>
     <!-- 上面部分 -->
-    <div v-if="!displayTable && apk == false" class="tops">
+    <div v-if="!displayTable && apk == false" class="tops" :style="'height:' +hubs+'px'">
         <!-- 公共 -->
-        <div class="ctons" :style="'width: '+kuanBl+'px'">
+        <div class="ctons" style="width: 98%">
             <!-- 表单 -->
             <el-form ref="addForm" :model="addForm" label-width="80px" :rules="addFormRules">
                 <!-- 请假类型 -->
@@ -170,9 +170,9 @@
     </div>
 
     <!-- 下面部分 -->
-    <div v-if="displayTable && apk == false" class="tops">
+    <div v-if="displayTable && apk == false" class="tops" :style="'height:' +hubs+'px'">
         <!-- 公共 -->
-        <div class="ctons" :style="'width: '+kuanBl+'px'">
+        <div class="ctons" style="width: 98%;">
           <div class="flex">
             <div>
               <el-select v-model="ownerIds" placeholder="请选择请假人" clearable @change="chufas()" style="width: 160px" size="small" v-show="permissions.leaveAll" filterable="true">
@@ -207,7 +207,7 @@
               <el-date-picker v-model="createDate" type="date" @change="chufas()" value-format="yyyy-MM-dd" placeholder="选择日期" size="small" clearable="false"> </el-date-picker>
             </div>
           </div>
-            <el-table v-loading="loading" :data="tableData" style="width: 100%" height="90%">
+            <el-table v-loading="loading" :data="tableData" style="width: 100%" height="94%">
                 <el-table-column prop="ownerName" label="请假人" min-width="120" fixed="left"></el-table-column>
                 <el-table-column prop="tel" label="电话" min-width="120"></el-table-column>
                 <el-table-column prop="leaveType" label="请假类型" min-width="120">
@@ -289,9 +289,9 @@
     </div>
 
     <!-- 统计部分 -->
-    <div v-if="displayTable && apk && apk2 == 4" class="tops">
+    <div v-if="displayTable && apk && apk2 == 4" class="tops" :style="'height:' +hubs+'px'">
       <!-- 公共 -->
-        <div class="ctons" :style="'width: '+kuanBl+'px'">
+        <div class="ctons" style="width: 98%;">
           <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 350px">
               <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
@@ -354,9 +354,9 @@
     </div>
 
 <!-- 审批流 -->
-    <div v-if="displayTable && apk && apk2 == 5" class="tops">
+    <div v-if="displayTable && apk && apk2 == 5" class="tops" :style="'height:' +hubs+'px'">
         
-        <div class="ctons" :style="'width: '+kuanBl+'px'">
+        <div class="ctons" style="width: 98%;">
         <el-col :span="6" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
@@ -419,8 +419,8 @@
 
     </div>
   <!-- 年假管理 -->
-    <div v-if="displayTable && apk && apk2 == 6" class="tops">
-      <div class="ctons" :style="'width: '+kuanBl+'px'">
+    <div v-if="displayTable && apk && apk2 == 6" class="tops" :style="'height:' +hubs+'px'">
+      <div class="ctons" style="width: 98%;">
         <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 18%;margin-left:1%">
               <el-button size="small" @click="changeAltime(0)">批量设置</el-button>
@@ -494,9 +494,9 @@
       </el-dialog>
     </div>
 
-    <div v-if="displayTable && apk && apk2 == 8" class="tops">
+    <div v-if="displayTable && apk && apk2 == 8" class="tops" :style="'height:' +hubs+'px'">
         <!-- 公共 -->
-        <div class="ctons" :style="'width: '+ kuanBl +'px'">
+        <div class="ctons" style="width: 98%;">
           <div class="flex">
             <div>
               <span>请假类型</span>
@@ -531,7 +531,7 @@
             </div>
             
           </div>
-            <el-table key="apk2is8" v-loading="loading" :data="vacationList" style="width: 100%" height="90%">
+            <el-table key="apk2is8" v-loading="loading" :data="vacationList" style="width: 100%" height="94%">
                 <el-table-column prop="name" label="员工姓名" min-width="120" fixed="left"></el-table-column>
                 <el-table-column label="有效期" min-width="250" align="center">
                   <template slot-scope="scope">
@@ -831,7 +831,7 @@ export default {
   created() {
     let widTHBul = document.documentElement.clientWidth - 440
     this.kuanBl = widTHBul
-    this.hubs = document.documentElement.clientHeight || document.body.clientHeight
+    this.hubs = (document.documentElement.clientHeight || document.body.clientHeight) - 70
     let height = window.innerHeight;
             this.tableHeight = height - 195;
             const that = this;
@@ -843,32 +843,19 @@ export default {
   },
 
   mounted() {
-    // this.watchSize()
     if(this.isDingding){
       this.bills(false,2)
       this.staffs(7,['7'])
       this.getUsers()
     }else{
       this.getUsers() // 获取人员信息
-      this.getDepartment();
-      this.getAl();
-      this.getApproverList()
+    this.getDepartment();
+    this.getAl();
+    this.getApproverList()
     }
   },
   filters: {},
   methods: {
-    // 监听元素
-    //  watchSize() {
-    //    const _this = this;
-    //    var erd = elementResizeDetectorMaker();
-    //    erd.listenTo(this.$refs.section, (element) => { // 这里的this.$refs.fan指定要监听的元素对象,对应的是<div ref="fan"></div>
-    //      var width = element.offsetWidth;
-    //      var height = element.offsetHeight;
-    //      _this.$nextTick(() => { // 这里填写监听改变后的操做
-    //       	console.log('触发监听')
-    //      });
-    //    });
-    //  },
     // 从钉钉同步假期剩余表
     listSynchronize(){
       this.synchronizeLoading = true
@@ -2032,8 +2019,7 @@ export default {
 /* 请假模块 */
 .tops {
     width: 100%;
-    height:100%;
-    position: absolute;
+    position: relative;
     background: #f7f7f7;
     box-sizing: border-box;
     padding: 20px 0 0 200px;
@@ -2055,7 +2041,7 @@ export default {
 }
 .poss {
     position: fixed;
-    bottom: 20px;
+    bottom: 4px;
     right: 1%;
     box-sizing: border-box;
 }

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -61,7 +61,10 @@
             <el-form ref="form3" :model="exportParam" >
                 <el-form-item prop="projectId" label="选择项目" v-if="radio != '人员'">
                     <el-select v-model="exportParam.projectId" placeholder="全部项目"  clearable style="width:350px;" filterable="true">
-                        <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName" :value="item.id"></el-option>
+                        <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
+                            <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+                            <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+                        </el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item prop="userIds" label="选择人员" v-if="radio == '人员'">

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/custom_data.vue

@@ -39,7 +39,10 @@
             <el-form ref="form3" :model="exportParam" >
                 <el-form-item prop="projectId" label="选择项目" >
                     <el-select v-model="exportParam.projectId" placeholder="全部项目"  clearable style="width:350px;" filterable="true">
-                        <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName" :value="item.id"></el-option>
+                        <el-option v-for="item in projectList"  :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
+                            <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
+                            <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
+                        </el-option>
                     </el-select>
                 </el-form-item>
                 <!-- <el-form-item prop="userIds" label="选择人员" >

+ 32 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -36,10 +36,9 @@
                     </el-select>
                 </el-form-item>
                 <!-- 分类条目 -->
-                <el-form-item style="float:right;"  v-if="permissions.projectClassification">
+                <!-- <el-form-item style="float:right;"  v-if="permissions.projectClassification">
                     <el-link type="primary" :underline="false" @click="showClfDialog = true">分类管理</el-link>
                 </el-form-item>
-                <!-- 项目成本基线条目 -->
                 <el-form-item style="float:right;"  v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
                     <el-link type="primary" :underline="false" @click="showBaseCostItemDialog">基线成本项</el-link>
                 </el-form-item>
@@ -54,7 +53,33 @@
                     <el-upload ref="upload" style="margin-left:5px;" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
                         <el-link type="primary" :underline="false" >导入项目</el-link>
                     </el-upload>
-                </el-form-item> 
+                </el-form-item>  -->
+                <el-form-item style="float:right;" v-if="permissions.projectImport || permissions.projectExport || permissions.projectClassification || (user.company.packageProject == 1 && permissions.projectCostOfItems)">
+                    <el-dropdown>
+                        <span class="el-dropdown-link">
+                            查看更多<i class="el-icon-arrow-down el-icon--right"></i>
+                        </span>
+                        <el-dropdown-menu slot="dropdown">
+                            <el-dropdown-item v-if="permissions.projectImport">
+                                <el-upload ref="upload" action="#" :limit="1" :http-request="importProject" :show-file-list="false">
+                                    <el-link :underline="false" >导入项目</el-link>
+                                </el-upload>
+                            </el-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectImport">
+                                <el-link :underline="false" href="./upload/项目导入模板.xlsx" download="项目导入模板.xlsx">模板下载</el-link>
+                            </el-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectExport">
+                                <el-link :underline="false" @click="exportProjectData" download="项目导出.xlsx">导出项目</el-link>
+                            </el-dropdown-item>
+                            <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">
+                                <el-link :underline="false" @click="showBaseCostItemDialog">基线成本项</el-link>
+                            </el-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectClassification">
+                                <el-link :underline="false" @click="showClfDialog = true">分类管理</el-link>
+                            </el-dropdown-item>
+                        </el-dropdown-menu>
+                        </el-dropdown>
+                </el-form-item>
                 <!-- <el-form-item style="float:right;" v-if="user.role == 1||user.role == 2||user.role == 5"> -->
                 <el-form-item style="float:right;" v-if="permissions.projectNew">
                     <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增项目</el-link>
@@ -71,7 +96,7 @@
         </el-col>
 
         <!--列表-->
-        <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight - 28" style="width: 100%;" @selection-change="checkedWudulist">
+        <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist">
             <el-table-column type="selection" width="60" :selectable="isSelectable">
                 <!-- creator 项目创建人    incharger 项目负责人 -->
             </el-table-column>
@@ -2444,6 +2469,9 @@ a {
 
 </style>
 <style>
+.el-dropdown-link {
+    color: #409EFF;
+}
 .customdropdown{
     margin-left: 10px;
 }

+ 97 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -11,7 +11,10 @@
                 </el-form-item>
                 <el-form-item label="项目" style="width: 215px">
                     <el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 175px">
-                        <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
+                        <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
+                            <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+                            <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+                        </el-option>
                     </el-select>
                 </el-form-item>
                 <!-- <el-form-item   style="margin-left:20px;">
@@ -211,6 +214,14 @@
                             </div>
                         </template>
                     </el-table-column>
+                    <el-table-column prop="date" label="操作" width="100">
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button type="warning" size="mini" v-if="scope.row.membdateList.length < 2 && scope.row.flg" @click="undoCli(scope.row, 0)">撤销</el-button>
+                                <el-button size="mini" v-if="scope.row.membdateList.length >= 2 && scope.row.flg" @click="detailsClick(scope.row)">详情</el-button>
+                            </div>
+                        </template>
+                    </el-table-column>
                 </el-table>
                 <el-col v-if="search.value != -1" :span="24" class="toolbar">
                     <el-pagination
@@ -225,7 +236,40 @@
                 </el-col> 
             </div>
         </el-dialog>
-
+        <!-- 审核记录撤销 -->
+        <el-dialog title="请输入原因"  v-if="undoFormDialog" :visible.sync="undoFormDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
+            <div>
+                <el-input type="textarea" v-model="undoForm.reason" rows="2" placeholder="请输入您决定撤销原因'" />
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button  @click="undoFormDialog = false" >取消</el-button>
+                <el-button type="primary" @click="clickCancel()">确定</el-button>
+            </div>
+        </el-dialog>
+        <!-- 审核记录详情列表 -->
+        <el-dialog title="审核记录"  v-if="detailsDialog" :visible.sync="detailsDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
+            <div>
+                <el-table :data="detailsList" style="width: 100%">
+                    <el-table-column prop="userName" label="员工/日期">
+                        <template slot-scope="scope">
+                            <div>
+                                {{scope.row.userName}}/{{scope.row.createDate}}
+                            </div>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="date" label="操作" width="80">
+                        <template slot-scope="scope">
+                            <div>
+                                <el-button type="warning" size="mini" @click="undoCli(scope.row, 1)">撤销</el-button>
+                            </div>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </div>
+            <div slot="footer" class="dialog-footer">
+                <el-button  @click="detailsDialog = false" size="mini">取消</el-button>
+            </div>
+        </el-dialog>
     </section>
 </template>
 
@@ -269,7 +313,14 @@
                 recordLists: [],
                 totals: 0,
                 pageIndexList: 1,
-                pageSizeList: 20
+                pageSizeList: 20,
+                undoForm: {
+                    reason: '',
+                    userId: '',
+                    createDate: ''
+                },
+                undoFormDialog: false,
+                detailsDialog: false,
             };
         },
         filters: {
@@ -280,6 +331,46 @@
             }
         },
         methods: {
+            detailsClick(item) {
+                this.detailsDialog = true
+                this.detailsList = item.membdateList
+            },
+            // 审核记录撤销点击确定
+            clickCancel() {
+                this.http.post('/report/denyHisReport', this.undoForm,
+                res => {
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: '撤销成功',
+                            type: "success"
+                        });
+                        this.undoFormDialog = false
+                        this.recordList()
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+            undoCli(item, i) {
+                console.log(item)
+                this.undoFormDialog = true
+                this.undoForm.reason = ''
+                this.undoForm.userId = item.userId
+                if(i == 0) {    
+                    this.undoForm.createDate = item.indate.split(' ')[0]
+                } else {
+                    this.undoForm.createDate = item.createDate
+                }
+            },
             // 获取审核记录
             recordList() {
                 // this.recordDialogVisible = true
@@ -291,6 +382,9 @@
                 },
                 res => {
                     if (res.code == "ok") {
+                        for (var i in res.data.records) {
+                            res.data.records[i].result.indexOf('通过') == '-1' ? res.data.records[i].flg = false : res.data.records[i].flg = true
+                        }
                         this.recordLists = res.data.records
                         this.totals = res.data.total
                     } else {
@@ -515,7 +609,6 @@
             // 未通过日报
             deny() {
                 this.logining = true;
-                
                 this.http.post( this.port.report.deny, this.denyForm,
                 res => {
                     this.logining = false;

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

@@ -11,7 +11,10 @@
                 </el-form-item>
                 <el-form-item label="项目:">
                     <el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true">
-                        <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
+                        <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
+                            <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+                            <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+                        </el-option>
                     </el-select>
                 </el-form-item>
                 <el-form-item style="margin-left:20px;">