Przeglądaj źródła

2022.4.15调整

山水共长天一色 3 lat temu
rodzic
commit
4d8f919ad4

+ 9 - 38
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -285,12 +285,8 @@
                   </el-select>
                 </div>
                 <div class="bianju">
-                    <span class="demonstration">开始日期</span>
-                    <el-date-picker v-model="statDatas" type="date" :picker-options="pickerOptionsStart" value-format="yyyy-MM-dd" placeholder="选择开始日期" @change="picks()"> </el-date-picker>
-                </div>
-                <div class="bianju">
-                    <span class="demonstration">结束日期</span>
-                    <el-date-picker v-model="endDatas" type="date" :picker-options="pickerOptionsEnd" value-format="yyyy-MM-dd" placeholder="选择结束日期" @change="picks()"> </el-date-picker>
+                    <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>
               <el-table v-if="ins == 6" :key="ins" border :data="overTimeList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
@@ -454,27 +450,10 @@ export default {
       ins: 0,
       user: JSON.parse(sessionStorage.user),
       overTimeList: [], // 项目加班情况统计列表
-      statDatas: this.getCurrentTimes(),
-      endDatas: this.getCurrentTime(),
       proList: [],
       proJuctId: '',
       createDate: '2020-01-01',
-      pickerOptionsStart: {
-        disabledDate: (time) => {
-          if (this.endDatas) {
-            return time.getTime() > new Date(this.endDatas).getTime() || time.getTime() <= new Date(this.createDate).getTime() - 86400000;
-          }
-          return time.getTime() <= new Date(this.createDate).getTime() - 86400000;
-        },
-      },
-      pickerOptionsEnd: {
-          disabledDate: (time) => {
-          if (this.statDatas) {
-              return time.getTime() < new Date(this.statDatas).getTime();
-          }
-          return time.getTime() <= new Date(this.createDate).getTime() - 86400000;
-          },
-      },
+      rangeDatas: this.getCurrentRangeTime()
     };
   },
   computed: {},
@@ -624,8 +603,8 @@ export default {
         } else if (this.ins == 6) {
           fName = "加班情况统计报表.xls";
           url += "/exportOvertimeList";
-          sl.startDate = this.statDatas
-          sl.endDate = this.endDatas
+          sl.startDate = this.rangeDatas[0]
+          sl.endDate = this.rangeDatas[1]
           sl.projectId = this.proJuctId
         }
           this.http.post(url, sl,
@@ -713,8 +692,8 @@ export default {
       this.listLoading = true;
       this.http.post('/project/getOvertimeList', {
                     projectId: this.proJuctId,
-                    startDate: this.statDatas,
-                    endDate: this.endDatas,
+                    startDate: this.rangeDatas[0],
+                    endDate: this.rangeDatas[1],
                     },
         res => {
             if (res.code == "ok") {
@@ -864,20 +843,12 @@ export default {
       this.overTime()
     },
     // 日期
-    getCurrentTime() {
-        var _this = this;
-      let yy = new Date().getFullYear();
-      let mm = new Date().getMonth()+1;
-      let dd = new Date().getDate();
-      _this.gettime = yy +'-'+ mm +'-'+ dd;
-       return  _this.gettime
-    },
-    getCurrentTimes() {
+    getCurrentRangeTime() {
         var _this = this;
       let yy = new Date().getFullYear();
       let mm = new Date().getMonth()+1;
       let dd = new Date().getDate();
-      _this.gettime = yy+'-'+mm+'-'+'01';
+      _this.gettime = [yy+'-'+mm+'-'+'01' , yy +'-'+ mm +'-'+ dd];
        return  _this.gettime
     },
     selcts() {

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -101,8 +101,8 @@
           <el-table
             :data="invoiceList"
             border
-            style="width: 100%;height: 100%"
-            max-height="300px"
+            style="width: 100%;height:100%"
+            height="286px"
             @row-dblclick="dbclick">
             <el-table-column prop="projectName" label="所属项目" width="180">
               <template slot-scope="scope">

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

@@ -46,12 +46,16 @@
                                 <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 class="cal" >
+                                            <el-link type="primary" @click="editTask(scope.row)">{{scope.row.name}}</el-link>
+                                        </div>
                                     </div>
                                 </el-popover>
                             </div>
                             <div v-else>
-                                <div class="cal" @click="editTask(scope.row)">{{scope.row.name}}</div>
+                                <div class="cal">
+                                    <el-link type="primary" @click="editTask(scope.row)">{{scope.row.name}}</el-link>
+                                </div>
                             </div>
                         </template>
                     </el-table-column>
@@ -73,7 +77,7 @@
                         <template slot-scope="scope">
                             <div style="display: flex;justify-content: space-between;padding-right: 40px">
                             <span style="display: inline-block;margin-right: 55px">
-                                <span  :class="judgedate(scope.row.endDate) ? 'redwarningspan' : ''" style="padding:1.5px">{{scope.row.endDate}}</span>
+                                <span  :class="judgedate(scope.row.endDate) ? 'redwarningspan autodatespan' : 'autodatespan'">{{scope.row.endDate}}</span>
                             </span>
                             <el-button v-if="searchField == 0" size="small" type="primary" @click="completes(scope.row.id, 0)">完成</el-button>
                             <el-button v-if="searchField == 1" size="small" type="warning" @click="completes(scope.row.id, 1)">重启</el-button>
@@ -488,11 +492,19 @@
     line-height: 0;
 }
 .cal {
+    color: #409EFF;
     width: 300px;
     overflow: hidden;
     white-space: nowrap;
     text-overflow: ellipsis;
-    cursor: pointer;
+}
+.autodatespan{
+    padding: 1.5px 2.5px;
+    width: 73px;
+    height: 16px;
+    line-height: 16px;
+    text-align: center;
+    display: block;
 }
 .redwarningspan{
     background: #e62412;