|
@@ -384,8 +384,8 @@
|
|
|
<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 :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1">
|
|
|
- <el-input :disabled="!canEdit" v-model="domain.customText" style="width:500px;" maxlength="25" show-word-limit></el-input>
|
|
|
+ <el-form-item :label="yonghuUser.customTextName + '123'" v-if="yonghuUser.customTextActive == 1">
|
|
|
+ <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" maxlength="25" show-word-limit></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item v-if="reportTimeType.type == 3" label="用时占比" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
|
|
|
:rules="{ required: true, message: '请设置用时占比', trigger: 'blur' }">
|
|
@@ -504,7 +504,7 @@
|
|
|
</el-form-item>
|
|
|
<!-- 自定义文本 -->
|
|
|
<el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1">
|
|
|
- <el-input :disabled="!canEdit" v-model="domain.customText" style="width:500px;" maxlength="25" show-word-limit></el-input>
|
|
|
+ <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" maxlength="25" show-word-limit></el-input>
|
|
|
</el-form-item>
|
|
|
<!--项目管理专业版模式下,项目下的近期执行的任务 -->
|
|
|
<el-form-item label="任务/里程碑" :prop="'domains.' + index + '.taskId'" v-if="user.company.packageProject==1" >
|
|
@@ -1847,22 +1847,62 @@
|
|
|
}
|
|
|
this.jsTime = quanbu
|
|
|
let worktime = this.jsTime
|
|
|
+
|
|
|
+ // 自动计算加班时长
|
|
|
if(this.isBatch != 0){
|
|
|
worktime = this.jsTime / this.jsDay
|
|
|
}
|
|
|
if(this.user.timeType.fillOvertime && domain){
|
|
|
- for(let di in spl){
|
|
|
+ let isover = false
|
|
|
+ let alltime = 0
|
|
|
+ let allover = 0 //此处alltime同上面的worktime
|
|
|
+ for(let d in spl){
|
|
|
+ if(spl[d].isOvertime){
|
|
|
+ isover = true
|
|
|
+ allover += spl[d].overtimeHours*1
|
|
|
+ }
|
|
|
+ alltime += spl[d].workingTime*1
|
|
|
+ }
|
|
|
+ if(domain.overtimeHours){
|
|
|
+ allover = allover - domain.overtimeHours
|
|
|
+ }
|
|
|
+ if(worktime*1 > this.user.timeType.allday){
|
|
|
+ if(isover){
|
|
|
+ if(alltime > (allover + this.user.timeType.allday)){
|
|
|
+ this.$set(domain,'isOvertime',true)
|
|
|
+ this.$set(domain,'overtimeHours',worktime - this.user.timeType.allday - allover)
|
|
|
+ }else{
|
|
|
+ this.$set(domain,'isOvertime',false)
|
|
|
+ this.$set(domain,'overtimeHours',null)
|
|
|
+ if(alltime < (allover + this.user.timeType.allday)){
|
|
|
+ let overtime = allover + this.user.timeType.allday - alltime
|
|
|
+ for(let pi in spl){
|
|
|
+ if(spl[pi].overtimeHours){
|
|
|
+ if((overtime - spl[pi].overtimeHours*1) > 0){
|
|
|
+ overtime = overtime - spl[pi].overtimeHours*1
|
|
|
+ this.$set(spl[pi],'isOvertime',false)
|
|
|
+ this.$set(spl[pi],'overtimeHours',null)
|
|
|
+ }else if((overtime - spl[pi].overtimeHours*1) < 0){
|
|
|
+ this.$set(spl[pi],'overtimeHours',spl[pi].overtimeHours*1 - overtime)
|
|
|
+ break
|
|
|
+ }else{
|
|
|
+ this.$set(spl[pi],'isOvertime',false)
|
|
|
+ this.$set(spl[pi],'overtimeHours',null)
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$set(domain,'isOvertime',true)
|
|
|
+ this.$set(domain,'overtimeHours',worktime - this.user.timeType.allday)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ for(let di in spl){
|
|
|
this.$set(spl[di],'isOvertime',false)
|
|
|
this.$set(spl[di],'overtimeHours',null)
|
|
|
}
|
|
|
- if(worktime*1 > this.user.timeType.allday){
|
|
|
- this.$set(domain,'isOvertime',true)
|
|
|
- this.$set(domain,'overtimeHours',worktime - this.user.timeType.allday)
|
|
|
- // domain.overtimeHours = domain.workingTime - this.user.timeType.allday
|
|
|
-
|
|
|
- }else {
|
|
|
- this.$set(domain,'isOvertime',false)
|
|
|
- this.$set(domain,'overtimeHours',null)
|
|
|
}
|
|
|
|
|
|
}
|