فهرست منبع

Merge remote-tracking branch 'origin/master'

yurk 2 سال پیش
والد
کامیت
ca76458d0b

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/permissions.js

@@ -21,6 +21,7 @@ const StringUtil = {
         structureExport: false, // 导出人员 // 
         structureImport: false, // 导入人员 // 
         structureCertificate: false, // 管理专业证书 //
+        structureCustomConfig: false, // 自定义配置 //
 
         // 工时报告
         reportsCompany: false, // 查看全公司工时 // 后台
@@ -48,6 +49,7 @@ const StringUtil = {
         reportCost: false, // 查看加班成本 //
         reportCostWarning: false, // 工时成本预警表 //
         reportPhaseCost: false, // 查看阶段成本 //
+        reportTimeDivide: false, // 人员工时分配表 //
 
         // 请假模块
         leaveFil : false, // 请假填报 // 
@@ -131,6 +133,8 @@ const StringUtil = {
         arr[i] == '下拨成本预算' ? obj.projectAllocate = true : ''
         arr[i] == '工时成本预警表' ? obj.reportCostWarning = true : ''
         arr[i] == '查看阶段成本' ? obj.reportPhaseCost = true : ''
+        arr[i] == '查看人员工时分配' ? obj.reportTimeDivide = true : ''
+        arr[i] == '自定义配置' ? obj.structureCustomConfig = true : ''
     }
 
     return obj

+ 25 - 33
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -20,7 +20,7 @@
                 <el-menu-item index="1-1" ><p @click="ssl(0)">项目报表</p></el-menu-item>
                 <el-menu-item index="1-2" v-if="permissions.reportTask"><p @click="ssl(1)">项目任务报表</p></el-menu-item>
                 <el-menu-item index="1-3" v-if="permissions.reportCostOf"><p @click="ssl(2)">项目成本报表</p></el-menu-item>
-                <el-menu-item index="1-9" v-if="permissions.reportCostWarning"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
+                <el-menu-item index="1-9" v-if="permissions.reportTimeDivide"><p @click="ssl(8)">人员工时分配表</p></el-menu-item>
                 <el-menu-item index="1-4" v-if="permissions.reportCostWarning"><p @click="ssl(7)">工时成本预警表</p></el-menu-item>
                 <el-menu-item index="1-5" v-if="permissions.reportBalance"><p @click="ssl(3)">项目收支平衡表</p></el-menu-item>
                 <el-menu-item index="1-6" v-if="user.company.packageCustomer == 1 && permissions.reportProfits"><p @click="ssl(4)">客户项目利润表</p></el-menu-item>
@@ -64,6 +64,19 @@
           </el-option>
         </el-select>
       </div>
+      <div v-if="ins == 6 || ins == 8" class="headScreen">
+          <el-select v-if="ins == 6" v-model="proJuctId" placeholder="请选择项目" @change="selcts()" clearable filterable size="small">
+            <el-option v-for="(item, index) in proListOvertime" :key="index" :label="item.projectName + (item.projectCode ? 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>
+          <span class="demonstration" style="color:#999;padding:0 10px">时间段</span>
+          <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:350px" :clearable="false" size="small"> </el-date-picker>
+          <el-select v-model="userId" placeholder="请选择人员" @change="selcts()" clearable filterable size="small" style="margin-left:10px">
+            <el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
+          </el-select>
+      </div>
       <p style="float: right;margin-right: 25px;" ><el-button type="primary" @click="exportExcel" size="mini">报表导出</el-button></p>
     </div>
     <div ref="staff" style="margin: 5px 0px 0px 200px; width: 84%">
@@ -310,30 +323,9 @@
             </el-table>
 
             <!-- 项目加班情况统计报表 -->
-            <div v-if="ins == 6 || ins == 8" style="padding: 0 20px">
-              <div class="flsx">
-                <div v-if="ins == 6">
-                  <!-- <el-select v-model="proJuctId" placeholder="请选择项目" @change="selcts()" clearable filterable>
-                    <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 + (item.projectCode ? 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>
-                </div>
-                <div class="bianju">
-                    <span class="demonstration">时间段</span>
-                    <el-date-picker v-model="rangeDatas" type="daterange" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:350px" :clearable="false"> </el-date-picker>
-                </div>
-                <div style="margin-left: 30px">
-                  <el-select v-model="userId" placeholder="请选择人员" @change="selcts()" clearable filterable>
-                    <el-option v-for="(item, index) in userList" :key="index" :label="item.name" :value="item.id"></el-option>
-                  </el-select>
-                </div>
-              </div>
-              <el-table v-if="ins == 6" key="6" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight - 30" style="width: 100%;">
+            <div v-if="ins == 6 || ins == 8">
+              
+              <el-table v-if="ins == 6" key="6" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
                 <el-table-column prop="projectCode" label="序号" width="80">
                   <template slot-scope="scope">
                     <div>
@@ -755,7 +747,7 @@ export default {
           
         });
 
-        console.log(sums, 123)
+        // console.log(sums, 123)
         this.$nextTick(()=>{ this.$refs.tab.doLayout()})
         return sums;
       },
@@ -962,7 +954,7 @@ export default {
         startDate: this.rangeDatas[0],
         endDate: this.rangeDatas[1],
       }
-      console.log(this.userId == false)
+      // console.log(this.userId == false)
       if(this.userId == '' || this.userId == null) {
         
       } else {
@@ -1069,7 +1061,7 @@ export default {
         res => {
             if (res.code == "ok") {
                 this.list5 = res.data.records;
-                console.log(this.list);
+                // console.log(this.list);
                 this.total = res.data.total;
                 this.stages = res.data.stages;
                 this.listLoading = false; 
@@ -1125,7 +1117,7 @@ export default {
         parameter.userId = this.userId
       }
       this.listLoading = true
-      this.http.post('project/getUserWorkingTimeList',parameter,
+      this.http.post('/project/getUserWorkingTimeList',parameter,
       res => {
         this.listLoading = false
         if(res.code == 'ok'){
@@ -1306,12 +1298,12 @@ export default {
        return  _this.gettime
     },
     selcts() {
-      console.log(this.customerId);
+      // console.log(this.customerId);
       this.getList()
     },
     // 成本查看明细
     costBtn(item) {
-      console.log(item, '明细')
+      // console.log(item, '明细')
       this.dialogVisibleDetails = true
       this.listLoading = true
       this.http.post('/project/getOvertimeDetail', {
@@ -1323,7 +1315,7 @@ export default {
       res => {
           this.listLoading = false
           if (res.code == "ok") {
-              console.log(res.data, '看看详情数据')
+              // console.log(res.data, '看看详情数据')
               this.detailsList = res.data
           } else {
               this.$message({
@@ -1515,7 +1507,7 @@ export default {
   margin: 20px 0;
 }
 .bianju {
-  margin-left: 40px;
+
 }
 .bianju span {
   display: inline-block;

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/customer/list.vue

@@ -221,7 +221,7 @@
                             batchIds += this.selectArr[m].id + ','
                         }
                         batchIds = batchIds.substring(0,batchIds.length - 1)
-                        this.http.post('customer-info/batchDelete',{
+                        this.http.post('/customer-info/batchDelete',{
                             batchIds
                         },res => {
                             this.delLoading = false

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

@@ -591,7 +591,7 @@ import { error } from 'dingtalk-jsapi';
         methods: {
             deleteSel(sel){
                 this.deleteSelList = sel
-                console.log(sel);
+                // console.log(sel);
             },
             deleteUsers(){
                 this.$confirm('是否确认删除?','提示',{
@@ -672,7 +672,7 @@ import { error } from 'dingtalk-jsapi';
                 },
                     res => {
                         if (res.code == "ok") {
-                            console.log(res.data, '数据')
+                            // console.log(res.data, '数据')
                             if(res.data) {
                                 this.reviewerRuleForm.auditorId = res.data.auditorId
                             } else {
@@ -791,7 +791,7 @@ import { error } from 'dingtalk-jsapi';
                             //上次如果没有配置过,需要初始化
                             for (var i=0;i<this.noReportUserList.length; i++) {
                                 var rUser = this.noReportUserList[i];
-                                console.log('userId====='+rUser.userId);
+                                // console.log('userId====='+rUser.userId);
                                 //检查当前列表中的无项目人员是否在之前的里面存在,如果不在需要加上去
                                 if (this.userCostSettingList.filter(c=>c.id == rUser.userId).length == 0) {
                                     var item = {name: rUser.name, id: rUser.userId};
@@ -941,7 +941,7 @@ import { error } from 'dingtalk-jsapi';
             downloadByA(row) {
                 const a = document.createElement('a'); // 创建a标签
                 a.setAttribute('download', row.name);// download属性
-                console.log(row.url);
+                // console.log(row.url);
                 a.setAttribute('href', row.url);// href链接
                 a.click();// 自执行点击事件
                 a.remove();
@@ -1030,7 +1030,7 @@ import { error } from 'dingtalk-jsapi';
                 this.http.post('/finance-tblcuscol/getAll', {companyId: this.user.companyId},
                     res => {
                         if (res.code == "ok") {
-                            console.log("获取自定义字段",res.data);
+                            // console.log("获取自定义字段",res.data);
                             this.customColsi = res.data;
                             this.tblCols = [];
                             this.tblCols.push(this.customColsi.monthCost);
@@ -1095,7 +1095,7 @@ import { error } from 'dingtalk-jsapi';
                             }
                         }
 
-                        console.log(res.data, '图表数据', this.widthHtval)
+                        // console.log(res.data, '图表数据', this.widthHtval)
 
                         var xList = [], yList = [], list = res.data.costList, 
                         
@@ -1295,7 +1295,7 @@ import { error } from 'dingtalk-jsapi';
                     // this.http.uploadFile('/finance/importData', formData,
                     this.http.uploadFile(urls, formData,
                     res => {
-                        console.log(this.user.timeType.financeAudit, '看看数据')
+                        // console.log(this.user.timeType.financeAudit, '看看数据')
                         this.$refs.upload.clearFiles();
                         this.listLoading = false;
                         this.isUploading = false;
@@ -1402,7 +1402,7 @@ import { error } from 'dingtalk-jsapi';
                 res => {
                     this.listLoading = false;
                     if (res.code == "ok") {
-                        console.log(res.data, '审核状态')
+                        // console.log(res.data, '审核状态')
                         if(res.data) {
                             if(res.data.state == '0') {
                                 this.revaelse = '待审核'
@@ -1444,7 +1444,7 @@ import { error } from 'dingtalk-jsapi';
                 },
                 res => {
                     if (res.code == "ok") {
-                       console.log(res.data, '拿到的数据')
+                    //    console.log(res.data, '拿到的数据')
                        this.ovReviewLis = res.data
                        if(this.tabPosition == 0) {
                            this.reviewLis = res.data.pendingList
@@ -1455,7 +1455,7 @@ import { error } from 'dingtalk-jsapi';
                        } else {
                            this.reviewLis = res.data.cancelList
                        }
-                       console.log(this.reviewLis, '数据')
+                    //    console.log(this.reviewLis, '数据')
                     } else {
                         this.$message({
                             message: res.msg,
@@ -1482,7 +1482,7 @@ import { error } from 'dingtalk-jsapi';
                 } else {
                     this.reviewLis = sss.cancelList
                 }
-                console.log(this.reviewLis, '数据')
+                // console.log(this.reviewLis, '数据')
             },
             // 审核操作
             operationList(zhi, id) {
@@ -1527,7 +1527,7 @@ import { error } from 'dingtalk-jsapi';
                 },
                 res => {
                     if (res.code == "ok") {
-                       console.log('123',res.data)
+                    //    console.log('123',res.data)
                        this.xzList = res.data.passList
                     } else {
                         this.$message({

+ 107 - 58
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -51,7 +51,7 @@
                     <el-form-item>
                         <div style="color:#999;font-size:13px;">共{{total}}人</div>
                     </el-form-item>
-                    <el-form-item style="float:right;" v-if="permissions.structureExport">
+                    <el-form-item style="float:right;" v-if="permissions.structureCustomConfig">
                         <el-link type="primary" :underline="false" @click="customConfigShow">自定义配置</el-link>
                     </el-form-item>
                     <el-form-item style="float:right;" v-if="permissions.structureExport">
@@ -258,8 +258,8 @@
                     :options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false"  clearable></el-cascader>
                 </el-form-item>
                 <el-form-item label="直属上级">
-                    <el-select v-model="insertForm.superiorId" placeholder="请选择角色" style="width: 100%" filterable>
-                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id">
+                    <el-select v-model="insertForm.superiorId" placeholder="请选择" style="width: 100%" filterable clearable>
+                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id" :disabled="item.id == insertForm.id">
                             <span style="float: left">{{item.name}}</span>
                             <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
                         </el-option>
@@ -340,6 +340,14 @@
                     :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" 
                     clearable></el-cascader>
                 </el-form-item>
+                <el-form-item label="直属上级">
+                    <el-select v-model="insertForm.superiorId" placeholder="请选择" style="width: 100%" filterable clearable>
+                        <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id" :disabled="item.id == insertForm.id">
+                            <span style="float: left">{{item.name}}</span>
+                            <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
+                        </el-option>
+                    </el-select>
+                </el-form-item>
             </el-form>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible1=false">取消</el-button>
@@ -461,15 +469,18 @@
                 <el-input size="medium" v-model="item.name" placeholder="请输入自定义配置项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
                     <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="0" style="margin-right:10px;margin-left:10px">下拉</el-radio>
                     <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="1">输入</el-radio>
-                <span style="display:inline-block;width:100px"><el-button v-if="cusItemTypes[index] == 0" type="primary" size="small" @click="getConfigItemBtn(item)">配置选项</el-button></span>
-                <el-button type="danger" size="small" @click="customConfigDelete(item,index)" style="">删除</el-button>
+                <span style="display:inline-block;">
+                    <el-button v-if="cusItemTypes[index] == 0" type="primary" size="small" @click="getConfigItemBtn(item)">配置选项</el-button>
+                    <span v-if="!item.id && item.name && item.type == 0" style="color:#999;font-size:13px">保存后可配置选项</span>
+                </span>
+                <el-button style="margin-left:20px" type="danger" size="small" v-if="item.id" @click="customConfigDelete(item,index)">删除</el-button>
             </p>
             
             </div>
             <div slot="footer" class="dialog-footer">
                 <el-button type="primary" @click="customConfigDialog = false" >关闭</el-button>
-                <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button>
-                <el-button type="primary" @click="customConfigListSave" >保存</el-button>
+                <!-- <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button> -->
+                <el-button type="primary" @click="customConfigListSave" :loading="saveBtnLoading">保存</el-button>
                 
             </div>
 
@@ -691,7 +702,8 @@
                 tableLoading: false,
 
                 suoying: ['plate1','plate2','plate3','plate4','plate5'],
-                insertFormPlates: []
+                insertFormPlates: [],
+                saveBtnLoading: false
             };
         },
         filters: {
@@ -747,21 +759,21 @@
                         let lists = JSON.parse(JSON.stringify(res.data))
                         this.userCustomConfig = JSON.parse(JSON.stringify(res.data))
                         // let lists = res.data
-                        this.customConfigList = res.data
-                        // this.customConfigList = [
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        //     { name: '', id: null, type: 1, companyId: null },
-                        // ]
-                        // for(let i in lists){
-                        //     this.$set(this.customConfigList[i],'name',lists[i].name)
-                        //     this.$set(this.customConfigList[i],'id',lists[i].id)
-                        //     this.$set(this.customConfigList[i],'type',lists[i].type)
-                        //     this.$set(this.customConfigList[i],'companyId',lists[i].companyId)
-                        // }
-                        console.log('customConfigList',this.customConfigList);
+                        // this.customConfigList = res.data
+                        this.customConfigList = [
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                            { name: '', id: null, type: 1, companyId: null },
+                        ]
+                        for(let i in lists){
+                            this.$set(this.customConfigList[i],'name',lists[i].name)
+                            this.$set(this.customConfigList[i],'id',lists[i].id)
+                            this.$set(this.customConfigList[i],'type',lists[i].type)
+                            this.$set(this.customConfigList[i],'companyId',lists[i].companyId)
+                        }
+                        // console.log('customConfigList',this.customConfigList);
                         this.cusItemTypes = []
                         for(let j in this.customConfigList){
                             if(this.customConfigList[j].type == null || this.customConfigList[j].type == 0){
@@ -793,30 +805,28 @@
                 // }
                 // jsonStr = jsonStr.substring(0,jsonStr.length - 1)
                 // let jsonStr = []
-                for(let i in this.customConfigList){
-                    let text = this.customConfigList[i].name.trim()
-                    if(!text){
-                        this.customConfigList.splice(i,1)
-                    }
-                }
+                this.saveBtnLoading = true
+                let parameter = this.customConfigList.filter(item => item.name.trim() != '')
                 
                 this.http.post('/user-custom/addOrMod',{
-                    json: JSON.stringify(this.customConfigList)
+                    json: JSON.stringify(parameter)
                 },res => {
                     if(res.code == 'ok'){
                         this.getCustomConfigList()
-                        this.customConfigDialog = false
+                        this.saveBtnLoading = false
                         this.$message({
                             message: '保存成功',
                             type: 'success'
                         })
                     }else {
+                        this.saveBtnLoading = false
                         this.$message({
                             message: res.msg,
                             type: 'error'
                         })
                     }
                 },err => {
+                    this.saveBtnLoading = false
                     this.$message({
                         message: err,
                         type: 'error'
@@ -946,8 +956,8 @@
                         }
                         this.$nextTick(()=>{
                             // let opt = this.users[0].plateMap[this.userCustomConfig[0].name]
-                            console.log('userCustomConfig',this.userCustomConfig);
-                            console.log('insertForm',this.insertForm);
+                            // console.log('userCustomConfig',this.userCustomConfig);
+                            // console.log('insertForm',this.insertForm);
                         })
                     }else {
                         this.$message({
@@ -962,12 +972,12 @@
                     })
                 })
             },
-            customConfigListAdd(){
-                this.customConfigList.push({
-                    name: '',
-                    type: 1
-                })
-            },
+            // customConfigListAdd(){
+            //     this.customConfigList.push({
+            //         name: '',
+            //         type: 1
+            //     })
+            // },
             // 批量修改部门
             handleSelectionZzjg(e){
                 // if (e.length == 0) {
@@ -1587,7 +1597,7 @@
                     this.title = "新增人员"
                     this.getUserCustomConfig()
                     // this.insertForm.plateMap['定义测试文本'] = '测试文本'
-                    console.log('insertForm123',this.insertForm);
+                    // console.log('insertForm',this.insertForm);
                 }
                 this.dialogVisible = true;
             },
@@ -1646,7 +1656,7 @@
                         //     }
                         // }
 
-                        console.log(form, 'form')
+                        // console.log(form, 'form')
                         
                         if (this.insertForm.id != null) {
                             form.id = this.insertForm.id;
@@ -1778,20 +1788,54 @@
                 for(var i in arr1) {
                     array1.push(parseInt(arr1[i]))
                 }
+                this.http.post('/user/getUserInfo', {
+                        userId: list1.id
+                    },
+                    res => {
+                        if (res.code == "ok") {
+                            this.insertForm = {
+                                id: res.data.id,
+                                name: res.data.name,
+                                phone: res.data.phone,
+                                roleId: res.data.roleId,
+                                monthCost:res.data.monthCost,
+                                cost: res.data.cost,
+                                departmentId: array1.reverse(),
+                                salaryType: res.data.salaryType,
+                                costApplyDate: res.data.costApplyDate,
+                                inductionDate: res.data.inductionDate,
+                                position: res.data.position,
+                                certJson: res.data.certList,
+                                plateMap: {},
+                                superiorId: res.data.superiorId,
+                            }
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }},
+                        error => {
+                                this.listLoading = false;
+                                this.$message({
+                                    message: error,
+                                    type: "error"
+                                });
+                            });
                 // console.log(list1)
-                this.insertForm = {
-                    id: list1.id,
-                    name: list1.name,
-                    phone: list1.phone,
-                    roleId: list1.roleId,
-                    monthCost:list1.monthCost,
-                    cost: list1.cost,
-                    departmentId: array1.reverse(),
-                    salaryType: list1.salaryType,
-                    name: list1.name,
-                    position: list1.position,
-                    certJson: list1.certJson
-                };
+                // this.insertForm = {
+                //     id: list1.id,
+                //     name: list1.name,
+                //     phone: list1.phone,
+                //     roleId: list1.roleId,
+                //     monthCost:list1.monthCost,
+                //     cost: list1.cost,
+                //     departmentId: array1.reverse(),
+                //     salaryType: list1.salaryType,
+                //     name: list1.name,
+                //     position: list1.position,
+                //     certJson: list1.certJson
+                // };
                 this.dialogVisible1 = true;
             },
 
@@ -1817,10 +1861,11 @@
                         if (this.insertForm.costApplyDate != null) {
                             form.costApplyDate = this.insertForm.costApplyDate;
                         }
-                    }
-                });
+                        if (this.insertForm.superiorId){
+                            form.superiorId = this.insertForm.superiorId
+                        }
 
-                this.http.post( this.port.manage.insert, form,
+                        this.http.post( this.port.manage.insert, form,
                         res => {
                             this.submitLoading = false;
                             if (res.code == "ok") {
@@ -1846,6 +1891,10 @@
                                 type: "error"
                             });
                         });
+                    }
+                });
+
+                
             },
 
             // 获取部门列表
@@ -2238,7 +2287,7 @@
                         });
                     });
                 } else {
-                    console.log('error submit!!');
+                    // console.log('error submit!!');
                     return false;
                 }
                 });

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

@@ -76,7 +76,7 @@
                     <!--系统管理员和部门负责人 -->
                     <div class="report_title" >
                         
-                        <span>工作日报 </span>
+                        <span>工作日报 ({{curDate}})</span>
                         <span v-if="permissions.reportsCompany||user.manageDeptId != 0 || permissions.reportsDept">| {{depData != null ?depData.label:""}}
                         <span v-if="targetUid == null">
                          - 已填写
@@ -5101,7 +5101,7 @@
     color:red;
 }
 .waitSubmitStyle{
-    color: #999;
+    color: #409eff;
 }
 .chooseDate {
     .waiting {

+ 18 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -223,7 +223,10 @@
                     <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>
+                                <template v-if="scope.row.membdateList.length < 2 && scope.row.flg">
+                                    <el-button type="warning" size="mini" v-if="scope.row.membdateList[0].state == 1" @click="undoCli(scope.row, 0)">撤销</el-button>
+                                    <el-link type="info" v-else :underline="false">{{scope.row.membdateList[0].state == 2 ? '已驳回' : '已撤销'}}</el-link>
+                                </template>
                                 <el-button size="mini" v-if="scope.row.membdateList.length >= 2 && scope.row.flg" @click="detailsClick(scope.row, scope.$index)">详情</el-button>
                             </div>
                         </template>
@@ -385,11 +388,16 @@
                 });
             },
             undoCli(item, i) {
-                console.log(item)
+                // console.log(item)
                 this.undoFormDialog = true
                 this.undoForm = {reason: ''}
                 // this.undoForm.reason = ''
-                this.undoForm.hisId = item.id
+                if(i){
+                    this.undoForm.hisId = item.id
+                }else{
+                    this.undoForm.hisId = item.membdateList[0].id
+                }
+                
                 this.ioss = i
                 // if(i == 0) {    
                 //     this.undoForm.createDate = item.indate.split(' ')[0]
@@ -414,7 +422,10 @@
                         }
                         this.recordLists = res.data.records
                         this.totals = res.data.total
-                        this.detailsList = this.recordLists[this.idx].membdateList
+                        if(this.recordLists.length != 0){
+                            this.detailsList = this.recordLists[this.idx].membdateList
+                        }
+                        
                     } else {
                         this.$message({
                             message: res.msg,
@@ -533,7 +544,7 @@
                     this.listLoading = false;
                     if (res.code == "ok") {
                         this.list = res.data;
-                        console.log(this.port.report.portList);
+                        // console.log(this.port.report.portList);
                     } else {
                         this.$message({
                         message: res.msg,
@@ -552,7 +563,7 @@
 
             // 通过日报
             approve(id,date, item) {
-                console.log(item);
+                // console.log(item);
                 this.logining = true;
                 
                 var ids = '';
@@ -688,7 +699,7 @@
             },
             // 选择日期后触发
             dataTimes() {
-                console.log(this.dataTime)
+                // console.log(this.dataTime)
                 this.search.startDate = this.dataTime[0]
                 this.search.endDate = this.dataTime[1]
                 this.getList()