|
@@ -10,6 +10,7 @@
|
|
style="width:190px;"
|
|
style="width:190px;"
|
|
@change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
|
|
@change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
|
|
<el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini" @click="showWorkTime"></el-button>
|
|
<el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini" @click="showWorkTime"></el-button>
|
|
|
|
+ <!-- <el-button style="margin-left:10px;" icon="iconfont firerock-icongongshitongji" size="mini" @click="tiaoshi"></el-button> -->
|
|
</div>
|
|
</div>
|
|
<div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">
|
|
<div slot="header" class="clearfix" id="clearfix" style="padding-left: 255px;">
|
|
<!-- <div class="jjk" style="display:inline-block;position:fixed;top:70px;background:#fff;left:250px;">
|
|
<!-- <div class="jjk" style="display:inline-block;position:fixed;top:70px;background:#fff;left:250px;">
|
|
@@ -773,7 +774,7 @@
|
|
<div class="selectworktime_export_l">
|
|
<div class="selectworktime_export_l">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
class="selecteworktime_datapick"
|
|
class="selecteworktime_datapick"
|
|
- v-model="WorktimeDatepickValue1"
|
|
|
|
|
|
+ v-model="WorktimeDatepickValue"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
type="daterange"
|
|
type="daterange"
|
|
align="right"
|
|
align="right"
|
|
@@ -794,7 +795,7 @@
|
|
<!-- 222 -->
|
|
<!-- 222 -->
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <el-input style="float:left;width:22%" v-model="searchKeyword1" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
|
|
|
|
|
|
+ <el-input style="float:left;width:22%" v-model="searchKeyword" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
|
|
<el-button slot="append" @click="searchScreen(0)" icon="el-icon-search"></el-button>
|
|
<el-button slot="append" @click="searchScreen(0)" icon="el-icon-search"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
@@ -916,7 +917,7 @@
|
|
<div class="selectworktime_export_l">
|
|
<div class="selectworktime_export_l">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
class="selecteworktime_datapick"
|
|
class="selecteworktime_datapick"
|
|
- v-model="WorktimeDatepickValue2"
|
|
|
|
|
|
+ v-model="WorktimeDatepickValue"
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
type="daterange"
|
|
type="daterange"
|
|
align="right"
|
|
align="right"
|
|
@@ -936,7 +937,7 @@
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <el-input style="float:left;width:22%" v-model="searchKeyword2" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
|
|
|
|
|
|
+ <el-input style="float:left;width:22%" v-model="searchKeyword" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
|
|
<el-button slot="append" @click="searchScreen(1)" icon="el-icon-search"></el-button>
|
|
<el-button slot="append" @click="searchScreen(1)" icon="el-icon-search"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</div>
|
|
</div>
|
|
@@ -1150,13 +1151,11 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
exportTimeDialog: false,
|
|
exportTimeDialog: false,
|
|
- searchKeyword1: '',
|
|
|
|
- searchKeyword2: '',
|
|
|
|
|
|
+ searchKeyword: '',
|
|
monthworkDateS: [],
|
|
monthworkDateS: [],
|
|
monthNotWorkDateS: [],
|
|
monthNotWorkDateS: [],
|
|
pickDateArray:[],
|
|
pickDateArray:[],
|
|
- WorktimeDatepickValue1: [],
|
|
|
|
- WorktimeDatepickValue2: [],
|
|
|
|
|
|
+ WorktimeDatepickValue: [],
|
|
activeName:"first",
|
|
activeName:"first",
|
|
submitingReport: false,
|
|
submitingReport: false,
|
|
importResultMsg:null,
|
|
importResultMsg:null,
|
|
@@ -1345,7 +1344,7 @@
|
|
if(e){
|
|
if(e){
|
|
this.monthNotWorkDateS = []
|
|
this.monthNotWorkDateS = []
|
|
for (let i = 0; i < this.monthNotWorkDate.length; i++) {
|
|
for (let i = 0; i < this.monthNotWorkDate.length; i++) {
|
|
- if(this.monthNotWorkDate[i].name.indexOf(this.searchKeyword2) != -1){
|
|
|
|
|
|
+ if(this.monthNotWorkDate[i].name.indexOf(this.searchKeyword) != -1){
|
|
this.monthNotWorkDateS.push(this.monthNotWorkDate[i])
|
|
this.monthNotWorkDateS.push(this.monthNotWorkDate[i])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1355,7 +1354,7 @@
|
|
}else{
|
|
}else{
|
|
this.monthworkDateS = []
|
|
this.monthworkDateS = []
|
|
for (let i = 0; i < this.monthworkDate.length; i++) {
|
|
for (let i = 0; i < this.monthworkDate.length; i++) {
|
|
- if(this.monthworkDate[i].name.indexOf(this.searchKeyword1) != -1){
|
|
|
|
|
|
+ if(this.monthworkDate[i].name.indexOf(this.searchKeyword) != -1){
|
|
this.monthworkDateS.push(this.monthworkDate[i])
|
|
this.monthworkDateS.push(this.monthworkDate[i])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1759,14 +1758,17 @@
|
|
|
|
|
|
this.selectProject(itemDomain, newIndex);
|
|
this.selectProject(itemDomain, newIndex);
|
|
},
|
|
},
|
|
- // tabupdata(){
|
|
|
|
- // if(this.WorktimeDatepickValue2.length == 0){
|
|
|
|
- // this.WorktimeDatepickValue2 = [this.getAutoWeekDate()[0],this.getAutoWeekDate()[6]];
|
|
|
|
- // // this.showMonthNotWorkTime()
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
|
|
+
|
|
showWorkTime(){
|
|
showWorkTime(){
|
|
this.monthWorkTimeDialog = true;
|
|
this.monthWorkTimeDialog = true;
|
|
|
|
+ this.searchKeyword = ''
|
|
|
|
+ this.WorktimeDatepickValue = this.istoMonth()
|
|
|
|
+ if(this.WorktimeDatepickValue.length == 0){
|
|
|
|
+ let newdate = new Date();
|
|
|
|
+ let nowdate = newdate.toLocaleDateString();
|
|
|
|
+ let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
|
|
+ this.WorktimeDatepickValue = nowwd
|
|
|
|
+ }
|
|
this.showMonthWorkTime()
|
|
this.showMonthWorkTime()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1780,13 +1782,13 @@
|
|
},
|
|
},
|
|
//导出员工每日填报工时数
|
|
//导出员工每日填报工时数
|
|
exportMembWorkHours() {
|
|
exportMembWorkHours() {
|
|
- console.log("exportMembWorkHours",this.WorktimeDatepickValue1);
|
|
|
|
|
|
+ console.log("exportMembWorkHours",this.WorktimeDatepickValue);
|
|
this.http.post(
|
|
this.http.post(
|
|
"/report/exportUserDailyWorkTime",
|
|
"/report/exportUserDailyWorkTime",
|
|
{
|
|
{
|
|
// month: this.date,
|
|
// month: this.date,
|
|
- startDate: this.WorktimeDatepickValue1[0],
|
|
|
|
- endDate: this.WorktimeDatepickValue1[1],
|
|
|
|
|
|
+ startDate: this.WorktimeDatepickValue[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue[1],
|
|
},
|
|
},
|
|
(res) => {
|
|
(res) => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -1809,8 +1811,8 @@
|
|
"/report/exportNoReportUserList",
|
|
"/report/exportNoReportUserList",
|
|
{
|
|
{
|
|
// month: this.date,
|
|
// month: this.date,
|
|
- startDate: this.WorktimeDatepickValue2[0],
|
|
|
|
- endDate: this.WorktimeDatepickValue2[1],
|
|
|
|
|
|
+ startDate: this.WorktimeDatepickValue[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue[1],
|
|
},
|
|
},
|
|
(res) => {
|
|
(res) => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -1838,23 +1840,32 @@
|
|
a.remove();
|
|
a.remove();
|
|
},
|
|
},
|
|
|
|
|
|
- // 111
|
|
|
|
|
|
+ // 是否本月判断
|
|
|
|
+ istoMonth(){
|
|
|
|
+ let todate = new Date()
|
|
|
|
+ let tomonth = todate.getMonth() + 1
|
|
|
|
+ let adate = todate.getFullYear() + '-' + (tomonth < 10 ? '0' + tomonth : tomonth)
|
|
|
|
+ if(this.date == adate){
|
|
|
|
+ return []
|
|
|
|
+ }else{
|
|
|
|
+ let sedate = new Date(this.date)
|
|
|
|
+ let semonth = sedate.getMonth() + 1
|
|
|
|
+ let seday = new Date(sedate.getFullYear(), semonth, 0).getDate()
|
|
|
|
+ let sedates1 = sedate.getFullYear() + '-' + (semonth < 10 ? '0' + semonth : semonth) + '-01'
|
|
|
|
+ let sedates2 = sedate.getFullYear() + '-' + (semonth < 10 ? '0' + semonth : semonth) + '-' + seday
|
|
|
|
+ return [sedates1, sedates2]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
showMonthWorkTime() {
|
|
showMonthWorkTime() {
|
|
- this.searchKeyword1 = ''
|
|
|
|
- if(this.WorktimeDatepickValue1.length == 0){
|
|
|
|
- let newdate = new Date();
|
|
|
|
- let nowdate = newdate.toLocaleDateString();
|
|
|
|
- let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
|
|
- this.WorktimeDatepickValue1 = nowwd
|
|
|
|
- }
|
|
|
|
- // this.allDate = this.alreadyAllDate(this.WorktimeDatepickValue1[0],this.WorktimeDatepickValue1[1])
|
|
|
|
|
|
+
|
|
this.http.post(
|
|
this.http.post(
|
|
"/report/getUserDailyWorkTime",
|
|
"/report/getUserDailyWorkTime",
|
|
// "/report/getNoReportUserList",
|
|
// "/report/getNoReportUserList",
|
|
{
|
|
{
|
|
// month: this.date,
|
|
// month: this.date,
|
|
- startDate: this.WorktimeDatepickValue1[0],
|
|
|
|
- endDate: this.WorktimeDatepickValue1[1],
|
|
|
|
|
|
+ startDate: this.WorktimeDatepickValue[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue[1],
|
|
},
|
|
},
|
|
(res) => {
|
|
(res) => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -1875,21 +1886,14 @@
|
|
);
|
|
);
|
|
},
|
|
},
|
|
showMonthNotWorkTime() {
|
|
showMonthNotWorkTime() {
|
|
- this.searchKeyword2 = ''
|
|
|
|
- if(this.WorktimeDatepickValue2.length == 0){
|
|
|
|
- let newdate = new Date();
|
|
|
|
- let nowdate = newdate.toLocaleDateString();
|
|
|
|
- let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
|
|
- this.WorktimeDatepickValue2 = nowwd
|
|
|
|
- }
|
|
|
|
- console.log("exportMembNotWorkHours",this.WorktimeDatepickValue2);
|
|
|
|
|
|
+ console.log("exportMembNotWorkHours",this.WorktimeDatepickValue);
|
|
this.http.post(
|
|
this.http.post(
|
|
// "/report/getUserDailyWorkTime",
|
|
// "/report/getUserDailyWorkTime",
|
|
"/report/getNoReportUserList",
|
|
"/report/getNoReportUserList",
|
|
{
|
|
{
|
|
// month: this.date,
|
|
// month: this.date,
|
|
- startDate: this.WorktimeDatepickValue2[0],
|
|
|
|
- endDate: this.WorktimeDatepickValue2[1],
|
|
|
|
|
|
+ startDate: this.WorktimeDatepickValue[0],
|
|
|
|
+ endDate: this.WorktimeDatepickValue[1],
|
|
},
|
|
},
|
|
(res) => {
|
|
(res) => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -1913,11 +1917,11 @@
|
|
let lastdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 7))
|
|
let lastdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 7))
|
|
let lastwd = [this.getAutoWeekDate(lastdate)[0],this.getAutoWeekDate(lastdate)[6]]
|
|
let lastwd = [this.getAutoWeekDate(lastdate)[0],this.getAutoWeekDate(lastdate)[6]]
|
|
if(e){
|
|
if(e){
|
|
- this.WorktimeDatepickValue1 = lastwd
|
|
|
|
|
|
+ this.WorktimeDatepickValue = lastwd
|
|
this.showMonthWorkTime()
|
|
this.showMonthWorkTime()
|
|
|
|
|
|
}else{
|
|
}else{
|
|
- this.WorktimeDatepickValue2 = lastwd
|
|
|
|
|
|
+ this.WorktimeDatepickValue = lastwd
|
|
this.showMonthNotWorkTime()
|
|
this.showMonthNotWorkTime()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1926,10 +1930,10 @@
|
|
let nowdate = newdate.toLocaleDateString();
|
|
let nowdate = newdate.toLocaleDateString();
|
|
let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
|
|
if(e){
|
|
if(e){
|
|
- this.WorktimeDatepickValue1 = nowwd
|
|
|
|
|
|
+ this.WorktimeDatepickValue = nowwd
|
|
this.showMonthWorkTime()
|
|
this.showMonthWorkTime()
|
|
}else{
|
|
}else{
|
|
- this.WorktimeDatepickValue2 = nowwd
|
|
|
|
|
|
+ this.WorktimeDatepickValue = nowwd
|
|
this.showMonthNotWorkTime()
|
|
this.showMonthNotWorkTime()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1938,10 +1942,10 @@
|
|
let nextdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 14))
|
|
let nextdate = newdate.toLocaleDateString(newdate.setDate(newdate.getDate() - 14))
|
|
let nextwd = [this.getAutoWeekDate(nextdate)[0],this.getAutoWeekDate(nextdate)[6]]
|
|
let nextwd = [this.getAutoWeekDate(nextdate)[0],this.getAutoWeekDate(nextdate)[6]]
|
|
if(e){
|
|
if(e){
|
|
- this.WorktimeDatepickValue1 = nextwd
|
|
|
|
|
|
+ this.WorktimeDatepickValue = nextwd
|
|
this.showMonthWorkTime()
|
|
this.showMonthWorkTime()
|
|
}else{
|
|
}else{
|
|
- this.WorktimeDatepickValue2 = nextwd
|
|
|
|
|
|
+ this.WorktimeDatepickValue = nextwd
|
|
this.showMonthNotWorkTime()
|
|
this.showMonthNotWorkTime()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -2871,7 +2875,7 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- // 改变月份
|
|
|
|
|
|
+ // 改变月份 -------
|
|
changeMonthOut() {
|
|
changeMonthOut() {
|
|
this.getAllDate();
|
|
this.getAllDate();
|
|
this.getReportList();
|
|
this.getReportList();
|