|
@@ -8,7 +8,7 @@
|
|
|
<div class="jjk" style="display:inline-block;position:absolute;top:15px;background:#fff;left:0px;z-index: 10;margin-top: -10px;padding-top: 10px;height: 42px;">
|
|
|
<el-date-picker size="small" v-model="date" :editable="false" format="yyyy-MM" value-format="yyyy-MM"
|
|
|
style="width:190px;"
|
|
|
- @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份"></el-date-picker>
|
|
|
+ @change="changeMonthOut" :clearable="false" type="month" placeholder="选择月份" :picker-options="getPickerOptions"></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="tiaoshi"></el-button> -->
|
|
|
</div>
|
|
@@ -511,7 +511,7 @@
|
|
|
</el-form-item>
|
|
|
<!-- 自定义文本 -->
|
|
|
<el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1" :prop="'domains.' + index + '.customText'" :rules="user.timeType.customTextStatus == 1 ? { required: true, message: '请填写' + yonghuUser.customTextName, trigger: ['change','blur'] } : null">
|
|
|
- <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" maxlength="25" show-word-limit></el-input>
|
|
|
+ <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" maxlength="1000"></el-input>
|
|
|
</el-form-item>
|
|
|
<!--项目管理专业版模式下,项目下的近期执行的任务 -->
|
|
|
<el-form-item label="任务/里程碑" :prop="'domains.' + index + '.taskId'" v-if="user.company.packageProject==1" >
|
|
@@ -1124,7 +1124,7 @@
|
|
|
<!-- 工时导入记录弹窗 -->
|
|
|
<el-dialog title="工时导入记录" v-loading="toViewloading" :visible.sync="toViewDialogVisible" width="400" :before-close="handleClose">
|
|
|
<div style="height: 452px">
|
|
|
- <el-table :data="toViewList" stripe style="width: 100%;" height="400">
|
|
|
+ <el-table :data="toViewList" stripe style="width: 100%;" height="400" :loading="toViewLoading">
|
|
|
<el-table-column prop="indate" label="导入时间"> </el-table-column>
|
|
|
<el-table-column prop="userName" label="操作人"> </el-table-column>
|
|
|
<el-table-column prop="datel" label="文件">
|
|
@@ -1288,6 +1288,30 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ getPickerOptions: {
|
|
|
+ disabledDate: (time) => {
|
|
|
+ var date = new Date();
|
|
|
+ var year = date.getFullYear();
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ var currentdate = year.toString() + month.toString();
|
|
|
+
|
|
|
+ var timeyear = time.getFullYear();
|
|
|
+ var timemonth = time.getMonth() + 1;
|
|
|
+ if (timemonth >= 1 && timemonth <= 9) {
|
|
|
+ timemonth = "0" + timemonth;
|
|
|
+ }
|
|
|
+ var timedate = timeyear.toString() + timemonth.toString();
|
|
|
+ if(this.user.timeType.fillAhead == 0){
|
|
|
+ return currentdate < timedate;
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
alalal: '8.0',
|
|
|
timeBasecostList:null,
|
|
|
tbload: false,
|
|
@@ -1828,6 +1852,7 @@
|
|
|
if(this.isBatch == 0) {
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
this.http.post('/report/getWorkDays',{
|
|
|
startDate: this.workForm.createDate[0],
|
|
|
endDate: this.workForm.createDate[1]
|
|
@@ -3328,12 +3353,18 @@
|
|
|
// 改变月份 -------
|
|
|
changeMonthOut() {
|
|
|
this.getAllDate();
|
|
|
+
|
|
|
+ this.choseDay = 0;
|
|
|
+ sessionStorage.msg = this.date + '-01'
|
|
|
+ let monthdate = new Date(this.date + '-01')
|
|
|
+ this.curDate = (monthdate.getMonth() + 1) + '月' + monthdate.getDate() + '日'
|
|
|
this.getReportList();
|
|
|
this.getDepartment();
|
|
|
},
|
|
|
|
|
|
// 选择日期
|
|
|
choseDate(i, item) {
|
|
|
+
|
|
|
if(this.canClick(i,item) == false && this.user.timeType.fillAhead == 0){
|
|
|
return
|
|
|
}
|
|
@@ -4592,12 +4623,15 @@
|
|
|
|
|
|
// 改变月份
|
|
|
changeMonth() {
|
|
|
+ let date = new Date()
|
|
|
+ let nowmon = date.getMonth() + 1
|
|
|
+ let nowday = date.getDate()
|
|
|
+ let nowdate = date.getFullYear() + '-' + (nowmon < 10 ? '0' + nowmon : nowmon) + '-' + (nowday < 10 ? '0' + nowday : nowday)
|
|
|
if (this.isBatch == 0) {
|
|
|
if(this.user.timeType.fillAhead == 0){
|
|
|
let date_a = new Date(this.workForm.createDate)
|
|
|
- let date_b = new Date(sessionStorage.msg)
|
|
|
- if(date_a.getTime() > date_b.getTime()){
|
|
|
- this.workForm.createDate = sessionStorage.msg
|
|
|
+ if(date_a.getTime() > date.getTime()){
|
|
|
+ this.workForm.createDate = nowdate
|
|
|
}
|
|
|
}
|
|
|
//只有按天填报才能获取当天的日报
|
|
@@ -4607,9 +4641,13 @@
|
|
|
}else {
|
|
|
if(this.user.timeType.fillAhead == 0){
|
|
|
let date_a = new Date(this.workForm.createDate[1])
|
|
|
- let date_b = new Date(sessionStorage.msg)
|
|
|
- if(date_a.getTime() > date_b.getTime()){
|
|
|
- this.workForm.createDate[1] = sessionStorage.msg
|
|
|
+ if(date_a.getTime() > date.getTime()){
|
|
|
+ this.workForm.createDate[1] = nowdate
|
|
|
+ let sdate = new Date(this.workForm.createDate[0])
|
|
|
+ let edate = new Date(this.workForm.createDate[1])
|
|
|
+ if(sdate > edate){
|
|
|
+ this.workForm.createDate[0] = this.workForm.createDate[1]
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|