|
@@ -255,7 +255,7 @@
|
|
<div v-if="falsss" style="display: inline-block;">共{{jsDay}} 天, {{jsTime}} 小时</div>
|
|
<div v-if="falsss" style="display: inline-block;">共{{jsDay}} 天, {{jsTime}} 小时</div>
|
|
<div v-if="isBatch!=0" style="display: inline-block;">共{{jsDay}} 天, 合计填报 {{jsTime}} 小时</div>
|
|
<div v-if="isBatch!=0" style="display: inline-block;">共{{jsDay}} 天, 合计填报 {{jsTime}} 小时</div>
|
|
<span v-if="reportTimeType.type == 3" style="margin-left:30px;">{{isBatch==0?'总':'每日'}}时长:</span>
|
|
<span v-if="reportTimeType.type == 3" style="margin-left:30px;">{{isBatch==0?'总':'每日'}}时长:</span>
|
|
- <el-input-number :disabled="!canEdit || user.timeType.lockWorktime" v-if="reportTimeType.type == 3" style="margin-left:10px;" @change="changeAllTime"
|
|
|
|
|
|
+ <el-input-number :disabled="(!canEdit || user.timeType.lockWorktime) && !isWeekend" v-if="reportTimeType.type == 3" style="margin-left:10px;" @change="changeAllTime"
|
|
v-model="reportTimeType.allday" :precision="1" :step="0.5" :max="12" :min="0.5"></el-input-number>
|
|
v-model="reportTimeType.allday" :precision="1" :step="0.5" :max="12" :min="0.5"></el-input-number>
|
|
<span v-if="reportTimeType.type == 3">小时</span>
|
|
<span v-if="reportTimeType.type == 3">小时</span>
|
|
|
|
|
|
@@ -263,7 +263,7 @@
|
|
<span v-if="user.timeType.syncDingding==1&&!workForm.time">暂无考勤记录</span>
|
|
<span v-if="user.timeType.syncDingding==1&&!workForm.time">暂无考勤记录</span>
|
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
|
|
+ <!-- 000000 -->
|
|
<div v-for="(domain, index) in workForm.domains" :key="domain.id" :style="index>0?'margin-top:10px;':''">
|
|
<div v-for="(domain, index) in workForm.domains" :key="domain.id" :style="index>0?'margin-top:10px;':''">
|
|
<div v-if="reportTimeType.multiWorktime==0">
|
|
<div v-if="reportTimeType.multiWorktime==0">
|
|
<el-form-item v-if="reportTimeType.type != 3" :label="reportTimeType.type ==2?'工作时间':'工作时长'" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
|
|
<el-form-item v-if="reportTimeType.type != 3" :label="reportTimeType.type ==2?'工作时间':'工作时长'" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
|
|
@@ -319,9 +319,9 @@
|
|
@change="iptChang()">
|
|
@change="iptChang()">
|
|
</el-time-picker>
|
|
</el-time-picker>
|
|
</span>
|
|
</span>
|
|
- <div class="overtime" v-if="user.timeType.fillOvertime">
|
|
|
|
|
|
+ <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend">
|
|
<el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
|
|
<el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
|
|
- <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
|
|
|
|
|
|
+ <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -393,7 +393,7 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 相关数值 -->
|
|
<!-- 相关数值 -->
|
|
- <el-form-item :label="yonghuUser.customDataName" v-if="yonghuUser.customDataActive == 1 && user.timeType.customDataStatus == 1" :prop="'domains.' + index + '.customData'" :rules="user.timeType.customDataStatus == 1 ? { type: 'number', required: true, message: '请填写' + yonghuUser.customDataName, trigger: ['change','blur'] } : null">
|
|
|
|
|
|
+ <el-form-item :label="yonghuUser.customDataName" v-if="yonghuUser.customDataActive == 1" :prop="'domains.' + index + '.customData'" :rules="user.timeType.customDataStatus == 1 ? { type: 'number', required: true, message: '请填写' + yonghuUser.customDataName, trigger: ['change','blur'] } : null">
|
|
<el-input-number :id="'numberData_'+index" :disabled="!canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
|
|
<el-input-number :id="'numberData_'+index" :disabled="!canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 自定义文本 -->
|
|
<!-- 自定义文本 -->
|
|
@@ -406,8 +406,8 @@
|
|
<el-col span="14"><el-slider :disabled="!canEdit" v-model="domain.progress" :min="5" :show-tooltip="false" :step="5" style="width:180px;" @input="domain.workingTime = (reportTimeType.allday*domain.progress/100).toFixed(1)" @change="seleChn(0)"></el-slider></el-col>
|
|
<el-col span="14"><el-slider :disabled="!canEdit" v-model="domain.progress" :min="5" :show-tooltip="false" :step="5" style="width:180px;" @input="domain.workingTime = (reportTimeType.allday*domain.progress/100).toFixed(1)" @change="seleChn(0)"></el-slider></el-col>
|
|
<el-col span="10"><span style="margin-left:10px;float:right;"><span style="margin-right:10px;">{{domain.progress}}%</span>{{domain.workingTime}}小时</span></el-col>
|
|
<el-col span="10"><span style="margin-left:10px;float:right;"><span style="margin-right:10px;">{{domain.progress}}%</span>{{domain.workingTime}}小时</span></el-col>
|
|
</div>
|
|
</div>
|
|
- <div class="overtime" v-if="user.timeType.fillOvertime"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">加班</el-checkbox>
|
|
|
|
- <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
|
|
|
|
|
|
+ <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">加班</el-checkbox>
|
|
|
|
+ <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!--工程专业版本模式下, 各个专业的进度填报 -->
|
|
<!--工程专业版本模式下, 各个专业的进度填报 -->
|
|
@@ -440,7 +440,7 @@
|
|
<el-select v-model="domain.projectId" placeholder="请选择项目" style="width:200px;" clearable="true" filterable="true" value-key="id"
|
|
<el-select v-model="domain.projectId" placeholder="请选择项目" style="width:200px;" clearable="true" filterable="true" value-key="id"
|
|
@change="selectProject(domain, index)"
|
|
@change="selectProject(domain, index)"
|
|
:disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
|
|
:disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
|
|
- <el-option v-for="item in fillProjectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
|
|
|
|
|
|
+ <el-option v-for="item in fillProjectList" :disabled="item.status!=1 && item.status!=4" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
|
|
<span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
|
|
<span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
|
|
<span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
|
|
<span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
|
|
</el-option>
|
|
</el-option>
|
|
@@ -461,8 +461,8 @@
|
|
<i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
|
|
<i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
|
|
</el-link>
|
|
</el-link>
|
|
|
|
|
|
- <div class="overtime" v-if="user.timeType.fillOvertime"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
|
|
|
|
- <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
|
|
|
|
|
|
+ <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
|
|
|
|
+ <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- <el-link type="primary" v-if="canEdit"
|
|
<!-- <el-link type="primary" v-if="canEdit"
|
|
@@ -648,7 +648,7 @@
|
|
<el-select v-model="selCon" multiple placeholder="请选择" filterable>
|
|
<el-select v-model="selCon" multiple placeholder="请选择" filterable>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in fillProjectList"
|
|
v-for="item in fillProjectList"
|
|
- :disabled="item.status>=2"
|
|
|
|
|
|
+ :disabled="item.status!=1 && item.status!=4"
|
|
:key="item.id"
|
|
:key="item.id"
|
|
:label="item.projectName"
|
|
:label="item.projectName"
|
|
:value="item.id">
|
|
:value="item.id">
|
|
@@ -1544,6 +1544,7 @@
|
|
approvalProcessDialog: false,
|
|
approvalProcessDialog: false,
|
|
approvalProcessData: [],
|
|
approvalProcessData: [],
|
|
leaveTypeName: ['事假','病假','年假','产假','婚假','丧假','调休假','陪产假','其他',],
|
|
leaveTypeName: ['事假','病假','年假','产假','婚假','丧假','调休假','陪产假','其他',],
|
|
|
|
+ isWeekend: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -3730,7 +3731,7 @@
|
|
});
|
|
});
|
|
|
|
|
|
},
|
|
},
|
|
- // 获取个人某天的日报
|
|
|
|
|
|
+ // 获取个人某天的日报 000000
|
|
getReport() {
|
|
getReport() {
|
|
this.http.post( this.port.report.getPort, {
|
|
this.http.post( this.port.report.getPort, {
|
|
date: this.workForm.createDate
|
|
date: this.workForm.createDate
|
|
@@ -3821,6 +3822,12 @@
|
|
userNames:null,
|
|
userNames:null,
|
|
time: this.report.time
|
|
time: this.report.time
|
|
}
|
|
}
|
|
|
|
+ if(this.isWeekend){
|
|
|
|
+ this.$set(this.workForm.domains[0],'isOvertime',true)
|
|
|
|
+ if(this.reportTimeType.type != 2){
|
|
|
|
+ this.$set(this.workForm.domains[0],'overtimeHours',this.reportTimeType.allday.toFixed(0))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if(this.user.timeType.type == 1) {
|
|
if(this.user.timeType.type == 1) {
|
|
var shuzhi = this.user.timeType.allday + ''
|
|
var shuzhi = this.user.timeType.allday + ''
|
|
// console.log('执行一次', shuzhi.indexOf('.'))
|
|
// console.log('执行一次', shuzhi.indexOf('.'))
|
|
@@ -3853,6 +3860,7 @@
|
|
|
|
|
|
// 打开日报填写
|
|
// 打开日报填写
|
|
fillInReport(i, isBatch) {
|
|
fillInReport(i, isBatch) {
|
|
|
|
+ this.isWeekend = false
|
|
// console.log(this.user.timeType.type, '选择时长')
|
|
// console.log(this.user.timeType.type, '选择时长')
|
|
if(i != 1) {
|
|
if(i != 1) {
|
|
this.falsss = false
|
|
this.falsss = false
|
|
@@ -3871,6 +3879,16 @@
|
|
this.isBatch = isBatch;
|
|
this.isBatch = isBatch;
|
|
if (this.isBatch == 0 && !this.isSubstitude) {
|
|
if (this.isBatch == 0 && !this.isSubstitude) {
|
|
this.workForm.createDate = this.date + day; // 获取个人某天的日报
|
|
this.workForm.createDate = this.date + day; // 获取个人某天的日报
|
|
|
|
+ let weekday = new Date(this.workForm.createDate).getDay()
|
|
|
|
+ if(this.user.companyId == 817){
|
|
|
|
+ if(weekday == 0){
|
|
|
|
+ this.isWeekend = true
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(weekday == 0 || weekday == 6){
|
|
|
|
+ this.isWeekend = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.getReport(i);
|
|
this.getReport(i);
|
|
} else {
|
|
} else {
|
|
// console.log('执行到了这里')
|
|
// console.log('执行到了这里')
|
|
@@ -4671,6 +4689,12 @@
|
|
worktimeList:[{}],
|
|
worktimeList:[{}],
|
|
// degreeId: '',
|
|
// degreeId: '',
|
|
};
|
|
};
|
|
|
|
+ if(this.isWeekend){
|
|
|
|
+ this.$set(addItem,'isOvertime',true)
|
|
|
|
+ if(this.reportTimeType.type == 3){
|
|
|
|
+ this.$set(addItem,'overtimeHours',(leftProgress*this.reportTimeType.allday/100).toFixed(0))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (this.timeBasecostList && this.timeBasecostList.length > 0) {
|
|
if (this.timeBasecostList && this.timeBasecostList.length > 0) {
|
|
//默认给第一个,必填字段
|
|
//默认给第一个,必填字段
|
|
addItem.basecostId = this.timeBasecostList[0].id;
|
|
addItem.basecostId = this.timeBasecostList[0].id;
|
|
@@ -4710,6 +4734,7 @@
|
|
|
|
|
|
// 改变月份
|
|
// 改变月份
|
|
changeMonth() {
|
|
changeMonth() {
|
|
|
|
+ this.isWeekend = false
|
|
let date = new Date()
|
|
let date = new Date()
|
|
let nowmon = date.getMonth() + 1
|
|
let nowmon = date.getMonth() + 1
|
|
let nowday = date.getDate()
|
|
let nowday = date.getDate()
|
|
@@ -4723,6 +4748,16 @@
|
|
}
|
|
}
|
|
//只有按天填报才能获取当天的日报
|
|
//只有按天填报才能获取当天的日报
|
|
if(!this.isSubstitude){
|
|
if(!this.isSubstitude){
|
|
|
|
+ let weekday = new Date(this.workForm.createDate).getDay()
|
|
|
|
+ if(this.user.companyId == 817){
|
|
|
|
+ if(weekday == 0){
|
|
|
|
+ this.isWeekend = true
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(weekday == 0 || weekday == 6){
|
|
|
|
+ this.isWeekend = true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.getReport()
|
|
this.getReport()
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|