|
@@ -1379,7 +1379,7 @@
|
|
|
:default-time="['12:00:00', '12:00:00']"
|
|
|
size="small"
|
|
|
popper-class="selecteorktime_datapick_popper"
|
|
|
- @change="showMonthWorkTime()"
|
|
|
+ @change="showMonthWorkTime('first')"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
<el-button size="small" @click="getDoubleLastWeek(1)">{{$t('time.twoWeeksAgo')}}</el-button>
|
|
@@ -1395,12 +1395,6 @@
|
|
|
<selectCat v-if="user.userNameNeedTranslate == '1'" :filterable="true" :searchBoxTop="'1'" :size="'small'" :subject="usersList" :subjectId="usersListId" :distinction="'12'" :clearable="true" @selectCal="selectCal"></selectCat>
|
|
|
</div>
|
|
|
<div style="float: right; vertical-align: middle;height:32px">
|
|
|
- <el-link
|
|
|
- v-if="user.companyId==5978"
|
|
|
- type="primary"
|
|
|
- @click="changeReminder()"
|
|
|
- >{{'变更提醒'}}</el-link
|
|
|
- >
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
@click="exportMembWorkHours()"
|
|
@@ -1632,6 +1626,184 @@
|
|
|
<el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isFlag" :title="$t('message.loading')+'...'" type="success" center :closable="false" show-icon></el-alert>
|
|
|
<el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isMore" :title="$t('message.noMoreData')" type="success" center show-icon></el-alert>
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane v-if="user.companyId=5978" :label="'工时填报明细'" name="third">
|
|
|
+ <div class="selectworktime_export" style="margin-top:10px;">
|
|
|
+ <!-- <div class="selectworktime_export_l">
|
|
|
+ <el-date-picker
|
|
|
+ class="selecteworktime_datapick"
|
|
|
+ v-model="WorktimeDatepickValue"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ align="right"
|
|
|
+ unlink-panels
|
|
|
+ :range-separator="$t('other.to')"
|
|
|
+ :start-placeholder="$t('time.startDate')"
|
|
|
+ :end-placeholder="$t('time.endDate')"
|
|
|
+ :default-time="['12:00:00', '12:00:00']"
|
|
|
+ size="small"
|
|
|
+ popper-class="selecteorktime_datapick_popper"
|
|
|
+ @change="showMonthWorkTime()"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ <el-button size="small" @click="getDoubleLastWeek(1)">{{$t('time.twoWeeksAgo')}}</el-button>
|
|
|
+ <el-button size="small" @click="getLastWeek(1)">{{$t('time.lastWeek')}}</el-button>
|
|
|
+ <el-button size="small" @click="getThisWeek(1)">{{$t('time.nextWeek')}}</el-button>
|
|
|
+ </div> -->
|
|
|
+ <div>
|
|
|
+ <el-input style="float:left;width:22%" v-if="user.userNameNeedTranslate != '1'" v-model="searchKeyword" class="input-with-select" :placeholder="$t('defaultText.pleaseEnterNametoSearch')" clearable="true" size="small">
|
|
|
+ <el-button slot="append" @click="searchScreen(0)" icon="el-icon-search"></el-button>
|
|
|
+ </el-input>
|
|
|
+ <selectCat v-if="user.userNameNeedTranslate == '1'" :filterable="true" :searchBoxTop="'1'" :size="'small'" :subject="usersList" :subjectId="usersListId" :distinction="'12'" :clearable="true" @selectCal="selectCal"></selectCat>
|
|
|
+ </div>
|
|
|
+ <div style="float: right; vertical-align: middle;height:32px">
|
|
|
+ <el-link
|
|
|
+ v-if="user.companyId==5978"
|
|
|
+ type="primary"
|
|
|
+ @click="changeReminder()"
|
|
|
+ >{{'变更提醒'}}</el-link
|
|
|
+ >
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ @click="exportMembWorkHours()"
|
|
|
+ >{{$t('export.exportData')}}</el-link
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-table ref="hasworkTbl"
|
|
|
+ :data="monthWorkDataS"
|
|
|
+ v-el-table-infinite-scroll="listScroll"
|
|
|
+ border
|
|
|
+ :height="500"
|
|
|
+ highlight-current-row
|
|
|
+ style="width: 100%"
|
|
|
+ v-loading="tbload"
|
|
|
+ :lazy="true"
|
|
|
+ >
|
|
|
+ <el-table-column width="75" type="index" fixed="left" :label="$t('headerTop.serialNumber')">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column width="105" prop="name" fixed="left" :label="$t('lable.name')">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span :style="scope.row.worktimeList.length==0?'color:red':''">
|
|
|
+ <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='scope.row.name'></ww-open-data></span>
|
|
|
+ <span v-if="user.userNameNeedTranslate != 1">{{scope.row.name}}</span>
|
|
|
+ <!-- {{scope.row.name}} -->
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="departmentName" fixed="left" :label="$t('lable.department')">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='departmentName' :openid='scope.row.departmentName'></ww-open-data></span>
|
|
|
+ <span v-if="user.userNameNeedTranslate != 1">{{scope.row.departmentName}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ min-width="105"
|
|
|
+ v-for="(item, index) in pickDateArray"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div
|
|
|
+ style="color: red"
|
|
|
+ v-if="
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>
|
|
|
+ w.createDate==item.date
|
|
|
+ ).length > 0 &&
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime < reportTimeType.allday
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime.toFixed(1)
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ style="color: #20a0ff"
|
|
|
+ v-if="
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ ).length > 0 &&
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime > reportTimeType.allday
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime.toFixed(1)
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ ).length > 0 &&
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime == reportTimeType.allday
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ ).length == 0
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 0
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ ).length > 0 &&
|
|
|
+ typeof scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime == 'string'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ {{
|
|
|
+ scope.row.worktimeList.filter(
|
|
|
+ (w) =>w.createDate==item.date
|
|
|
+ )[0].workingTime
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isFlag" :title="$t('message.loading')+'...'" type="success" center :closable="false" show-icon></el-alert>
|
|
|
+ <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isMore" :title="$t('message.noMoreData')" type="warning" center show-icon></el-alert>
|
|
|
+
|
|
|
+ <!-- <div slot="title" class="dialog-title selectworktime_title">
|
|
|
+ <label style="font-size: 16px">员工每日已填报工时数</label>
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ style="float: right; margin-right: 60px"
|
|
|
+ @click="exportMembWorkHours()"
|
|
|
+ >导出已填报数据</el-link
|
|
|
+ > -->
|
|
|
+ <!-- <el-button >导出</el-button> -->
|
|
|
+ <!-- </div> -->
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</el-dialog>
|
|
|
<!--驳回弹出框 -->
|
|
@@ -2307,6 +2479,7 @@
|
|
|
],
|
|
|
pushWorkTimeLogDig:false,
|
|
|
pushWorkTimeLogData:[],
|
|
|
+ WorktimeDatepickValueForMonth:[],
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -2357,6 +2530,7 @@
|
|
|
this.getDepartment();
|
|
|
this.scrollFunction()
|
|
|
this.userssHu();
|
|
|
+ this.getFirstAndLastDay()
|
|
|
if(this.user.timeType.reportAuditType == 3){
|
|
|
this.getAllUsersList()
|
|
|
}
|
|
@@ -3707,14 +3881,14 @@
|
|
|
let nowwd = [getauto[0],getauto[6]]
|
|
|
this.WorktimeDatepickValue = nowwd
|
|
|
}
|
|
|
- this.showMonthWorkTime()
|
|
|
+ this.showMonthWorkTime('first')
|
|
|
},
|
|
|
|
|
|
handleClick(t,e){
|
|
|
- if (t.name == "first") {
|
|
|
- this.showMonthWorkTime()
|
|
|
- }else{
|
|
|
+ if (t.name == "second") {
|
|
|
this.showMonthNotWorkTime()
|
|
|
+ }else{
|
|
|
+ this.showMonthWorkTime(t.name)
|
|
|
}
|
|
|
},
|
|
|
//导出员工每日填报工时数
|
|
@@ -3789,17 +3963,25 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- showMonthWorkTime() {
|
|
|
+ showMonthWorkTime(t) {
|
|
|
this.monthTotalPage = 0,
|
|
|
this.tbload = true
|
|
|
+ let parameter={}
|
|
|
+ if(t == "first"){
|
|
|
+ parameter={
|
|
|
+ startDate: this.WorktimeDatepickValue[0],
|
|
|
+ endDate: this.WorktimeDatepickValue[1],
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ parameter={
|
|
|
+ startDate: this.WorktimeDatepickValueForMonth[0],
|
|
|
+ endDate: this.WorktimeDatepickValueForMonth[1],
|
|
|
+ }
|
|
|
+ }
|
|
|
this.http.post(
|
|
|
"/report/getUserDailyWorkTime",
|
|
|
// "/report/getNoReportUserList",
|
|
|
- {
|
|
|
- // month: this.date,
|
|
|
- startDate: this.WorktimeDatepickValue[0],
|
|
|
- endDate: this.WorktimeDatepickValue[1],
|
|
|
- },
|
|
|
+ parameter,
|
|
|
(res) => {
|
|
|
if (res.code == "ok") {
|
|
|
this.tbload = false;
|
|
@@ -3952,6 +4134,25 @@
|
|
|
},300)
|
|
|
}
|
|
|
},
|
|
|
+ getFirstAndLastDay() {
|
|
|
+ // 将选定的月份转换为Date对象
|
|
|
+ var monthDate = new Date();
|
|
|
+ var year = monthDate.getFullYear();
|
|
|
+ var month = monthDate.getMonth();
|
|
|
+
|
|
|
+ // 计算起始日和结束日
|
|
|
+ var startDay = new Date(year, month, 1);
|
|
|
+ var endDay = new Date(year, month + 1, 0);
|
|
|
+ let lastmd = [this.formatDate(startDay),this.formatDate(endDay)]
|
|
|
+ this.WorktimeDatepickValueForMonth=lastmd
|
|
|
+ },
|
|
|
+ formatDate(date) {
|
|
|
+ var year = date.getFullYear();
|
|
|
+ var month = ("0" + (date.getMonth() + 1)).slice(-2);
|
|
|
+ var day = ("0" + date.getDate()).slice(-2);
|
|
|
+
|
|
|
+ return year + "-" + month + "-" + day;
|
|
|
+ },
|
|
|
// 获取默认这zhou日期参数 222
|
|
|
getLastWeek(e){
|
|
|
let newdate = new Date()
|
|
@@ -8032,6 +8233,25 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ //景昱变更提醒
|
|
|
+ changeReminder(){
|
|
|
+ this.http.post('/report/changeReminder',{
|
|
|
+ },res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },err => {
|
|
|
+ this.$message({
|
|
|
+ message: err,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 重庆物奇私人定制的按周填报弹窗关闭事件
|
|
|
fillWeekCustomClne() {
|
|
|
this.fillWeekDialogVisiCustom = false
|