Sfoglia il codice sorgente

选择项目增加编号显示,请假模块的样式调整

Lijy 3 anni fa
parent
commit
d3d6b0dd88

+ 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">

+ 10 - 23
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -87,7 +87,7 @@
     <!-- 上面部分 -->
     <div v-if="!displayTable && apk == false" class="tops">
         <!-- 公共 -->
-        <div class="ctons" :style="'width: '+kuanBl+'px'">
+        <div class="ctons" style="width: 98%">
             <!-- 表单 -->
             <el-form ref="addForm" :model="addForm" label-width="80px" :rules="addFormRules">
                 <!-- 请假类型 -->
@@ -172,7 +172,7 @@
     <!-- 下面部分 -->
     <div v-if="displayTable && apk == false" class="tops">
         <!-- 公共 -->
-        <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">
@@ -291,7 +291,7 @@
     <!-- 统计部分 -->
     <div v-if="displayTable && apk && apk2 == 4" class="tops">
       <!-- 公共 -->
-        <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">
@@ -356,7 +356,7 @@
 <!-- 审批流 -->
     <div v-if="displayTable && apk && apk2 == 5" class="tops">
         
-        <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'">
@@ -420,7 +420,7 @@
     </div>
   <!-- 年假管理 -->
     <div v-if="displayTable && apk && apk2 == 6" class="tops">
-      <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: 18%;margin-left:1%">
               <el-button size="small" @click="changeAltime(0)">批量设置</el-button>
@@ -496,7 +496,7 @@
 
     <div v-if="displayTable && apk && apk2 == 8" class="tops">
         <!-- 公共 -->
-        <div class="ctons" :style="'width: '+ kuanBl +'px'">
+        <div class="ctons" style="width: 98%;">
           <div class="flex">
             <div>
               <span>请假类型</span>
@@ -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
@@ -2033,7 +2020,7 @@ export default {
 .tops {
     width: 100%;
     height:100%;
-    position: absolute;
+    position: relative;
     background: #f7f7f7;
     box-sizing: border-box;
     padding: 20px 0 0 200px;

+ 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 == '人员'">

+ 20 - 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,21 @@
                     <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-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectImport">模板下载</el-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectExport">导出项目</el-dropdown-item>
+                            <el-dropdown-item v-if="user.company.packageProject == 1 && permissions.projectCostOfItems">基线成本项</el-dropdown-item>
+                            <el-dropdown-item v-if="permissions.projectClassification">分类管理</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 +84,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 +2457,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;">