|
@@ -418,7 +418,7 @@
|
|
|
</el-form-item>
|
|
|
<!--如果设置了工时成本预警的预算成本项-->
|
|
|
<el-form-item :label="$t('lable.budgetSource')" v-if="user.company.packageProject==1&&timeBasecostList &&timeBasecostList.length>0">
|
|
|
- <el-select v-model="domain.basecostId" :disabled="!domain.canEdit" @change="$forceUpdate()">
|
|
|
+ <el-select v-model="domain.basecostId" :disabled="!domain.canEdit" @change="$forceUpdate()" style="width:200px;">
|
|
|
<el-option v-for="item in timeBasecostList" :label="item.name" :value="item.id" :key="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -438,9 +438,9 @@
|
|
|
<el-option v-for="item in domain.stages" :key="item.id" :label="item.stagesName" :value="item.stagesName"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label="user.companyId==781? $t('other.reviewer') : $t('other.projectAuditor')">
|
|
|
+ <el-form-item :label="user.companyId==781? $t('other.reviewer') : $t('other.projectAuditor')" v-if="user.timeType.reportAuditType != 3">
|
|
|
|
|
|
- <el-select v-model="domain.projectAuditorId" :disabled="!domain.canEdit" @change="$forceUpdate()" v-if="user.userNameNeedTranslate != '1'">
|
|
|
+ <el-select v-model="domain.projectAuditorId" :disabled="!domain.canEdit" @change="$forceUpdate()" v-if="user.userNameNeedTranslate != '1'" style="width:200px;">
|
|
|
<el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id">
|
|
|
<span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
|
|
|
<span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.auditorName}}</span>
|
|
@@ -451,30 +451,34 @@
|
|
|
|
|
|
</el-form-item>
|
|
|
<!-- 111111 -->
|
|
|
- <!-- <el-form-item label="审核人" v-if="user.timeType.reportAuditType == 3">
|
|
|
- <el-select v-model="domain.auditorSettingArray.auditorFirst">
|
|
|
+ <el-form-item label="审核人" v-if="user.timeType.reportAuditType == 3">
|
|
|
+ <el-select v-model="domain.auditorFirst" placeholder="第一审核人" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
|
|
|
- <i class="el-icon-right"></i>
|
|
|
- <el-select v-model="domain.auditorSettingArray.auditorSec">
|
|
|
- <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ <template v-if="user.timeType.auditLevel > 1">
|
|
|
+ <i class="el-icon-right"></i>
|
|
|
+ <el-select v-model="domain.auditorSec" placeholder="第二审核人" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
+ <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
|
|
|
- <i class="el-icon-right"></i>
|
|
|
- <el-select v-model="domain.auditorSettingArray.auditorThird">
|
|
|
- <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ <template v-if="user.timeType.auditLevel > 2">
|
|
|
+ <i class="el-icon-right"></i>
|
|
|
+ <el-select v-model="domain.auditorThird" placeholder="第三审核人" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
+ <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="抄送人" v-if="user.timeType.reportAuditType == 3">
|
|
|
- <el-select v-model="domain.auditorSettingArray.ccUserid">
|
|
|
+ <el-select v-model="domain.ccUserid" clearable :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<!-- 相关维度/自定义维度 -->
|
|
|
<el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList != undefined && domain.wuduList.length != 0 ? { required: true, message: $t('defaultText.pleaseChoose') + yonghuUser.customDegreeName, trigger: ['change','blur'] } : null" :prop="'domains.' + index + '.degreeId'">
|
|
|
- <el-select v-model="domain.degreeId" clearable :placeholder="$t('defaultText.pleaseChoose')" :disabled="!domain.canEdit">
|
|
|
+ <el-select v-model="domain.degreeId" clearable :placeholder="$t('defaultText.pleaseChoose')" :disabled="!domain.canEdit" style="width:200px;">
|
|
|
<el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -833,12 +837,41 @@
|
|
|
<el-option v-for="item in zhoBao.stages" :key="item.id" :label="item.stagesName" :value="item.stagesName"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
- <div class="zhoFel" >
|
|
|
+ <div class="zhoFel" v-if="user.timeType.reportAuditType != 3">
|
|
|
<p>{{$t('other.reviewer')}}</p>
|
|
|
<el-select v-model="zhoBao.projectAuditorId" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
|
|
|
<el-option v-for="item in zhoBao.auditUserList" :key="item.id" :label="item.auditorName" :value="item.auditorId"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
+
|
|
|
+ <template v-if="user.timeType.reportAuditType == 3">
|
|
|
+ <div class="zhoFel">
|
|
|
+ <p>第一审核人</p>
|
|
|
+ <el-select v-model="zhoBao.auditorFirst" placeholder="第一审核人" style="width: 355px">
|
|
|
+ <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="zhoFel">
|
|
|
+ <p>第二审核人</p>
|
|
|
+ <el-select v-model="zhoBao.auditorSec" placeholder="第二审核人" style="width: 355px">
|
|
|
+ <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="zhoFel">
|
|
|
+ <p>第三审核人</p>
|
|
|
+ <el-select v-model="zhoBao.auditorThird" placeholder="第三审核人" style="width: 355px">
|
|
|
+ <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="zhoFel">
|
|
|
+ <p>抄送人</p>
|
|
|
+ <el-select v-model="zhoBao.ccUserid" :placeholder="$t('defaultText.pleaseChoose')" clearable="true" style="width: 355px">
|
|
|
+ <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<!-- 自定义维度 -->
|
|
|
<div class="zhoFel" v-if="user.timeType.customDegreeActive">
|
|
|
<p>{{user.timeType.customDegreeName}}</p>
|
|
@@ -4086,6 +4119,12 @@
|
|
|
overtimeHours: list.report[i].overtimeHours,
|
|
|
customText: list.report[i].customText,
|
|
|
basecostId: list.report[i].basecostId,
|
|
|
+
|
|
|
+ auditorFirst: list.report[i].auditorSetting.auditorFirst ? list.report[i].auditorSetting.auditorFirst : '',
|
|
|
+ auditorSec: list.report[i].auditorSetting.auditorSec ? list.report[i].auditorSetting.auditorSec : '',
|
|
|
+ auditorThird: list.report[i].auditorSetting.auditorThird ? list.report[i].auditorSetting.auditorThird : '',
|
|
|
+ ccUserid: list.report[i].auditorSetting.ccUserid ? list.report[i].auditorSetting.ccUserid : '',
|
|
|
+
|
|
|
canEdit: list.report[i].state >= 2 ? true : false
|
|
|
})
|
|
|
if (list.report[i].state >= 2) {
|
|
@@ -4119,7 +4158,13 @@
|
|
|
timeType:0,
|
|
|
multiWorktime: this.reportTimeType.multiWorktime,
|
|
|
worktimeList:[{}],
|
|
|
- canEdit: true
|
|
|
+ canEdit: true,
|
|
|
+
|
|
|
+ auditorFirst: '',
|
|
|
+ auditorSec: '',
|
|
|
+ auditorThird: '',
|
|
|
+ ccUserid: ''
|
|
|
+
|
|
|
}],
|
|
|
userId:null,
|
|
|
userNames:null,
|
|
@@ -4296,7 +4341,27 @@
|
|
|
},
|
|
|
// 按周填报里内容的填写点击确定
|
|
|
btnTianxiaes() {
|
|
|
- if (this.zhoBao.projectAuditorId) {
|
|
|
+ if (!this.zhoBao.projectAuditorId && this.user.timeType.reportAuditType != 3) {
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('message.Pleaseselectareviewer'),
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ let auditTips = ''
|
|
|
+ if(!this.zhoBao.auditorFirst){ auditTips += '第一、' }
|
|
|
+ if(!this.zhoBao.auditorSec && this.user.timeType.auditLevel > 1){ auditTips += '第二、' }
|
|
|
+ if(!this.zhoBao.auditorThird && this.user.timeType.auditLevel > 2){ auditTips += '第三、' }
|
|
|
+ if(auditTips){
|
|
|
+ auditTips = auditTips.substring(0,auditTips.length - 1)
|
|
|
+ this.$message({
|
|
|
+ message: '请选择[' + auditTips + ']审核人',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
let errtips = ''
|
|
|
if(this.user.timeType.customDegreeStatus == 1 && this.zhoBao.wuduList.length != 0 && !this.zhoBao.degreeId) {
|
|
|
errtips += this.user.timeType.customDegreeName + '、'
|
|
@@ -4316,23 +4381,16 @@
|
|
|
message: this.$t('other.pleaseYes') + errtips + this.$t('other.tofillin'),
|
|
|
type: 'warning'
|
|
|
})
|
|
|
- }else {
|
|
|
- this.tianxieDialogVisible = false
|
|
|
- var zhong = this.zhoData
|
|
|
- zhong[this.zhoBaoIdx][this.zhoBaoName] = this.zhoBao
|
|
|
- this.zhoData = zhong
|
|
|
- if(this.reportTimeType.type == 1) this.zhoXuan(this.zhoBao, this.zhoBaoIdx)
|
|
|
- if(this.reportTimeType.type == 2) this.zhoTimes(this.zhoBao, this.zhoBaoIdx)
|
|
|
- if(this.reportTimeType.type == 3) this.addBli(this.zhoBao, this.zhoBaoIdx)
|
|
|
+ return
|
|
|
}
|
|
|
-
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: this.$t('message.Pleaseselectareviewer'),
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ this.tianxieDialogVisible = false
|
|
|
+ var zhong = this.zhoData
|
|
|
+ zhong[this.zhoBaoIdx][this.zhoBaoName] = this.zhoBao
|
|
|
+ this.zhoData = zhong
|
|
|
+ if(this.reportTimeType.type == 1) this.zhoXuan(this.zhoBao, this.zhoBaoIdx)
|
|
|
+ if(this.reportTimeType.type == 2) this.zhoTimes(this.zhoBao, this.zhoBaoIdx)
|
|
|
+ if(this.reportTimeType.type == 3) this.addBli(this.zhoBao, this.zhoBaoIdx)
|
|
|
},
|
|
|
// 获取本周
|
|
|
getCurrentWeek() {
|
|
@@ -4851,6 +4909,22 @@
|
|
|
formData.append("projectId", this.projectList[s].id);
|
|
|
}
|
|
|
}
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ let audItem = {}
|
|
|
+ if(this.user.timeType.auditLevel > 0){
|
|
|
+ audItem.auditorFirst = zhoD[j].auditorFirst
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 1){
|
|
|
+ audItem.auditorSec = zhoD[j].auditorSec
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 2){
|
|
|
+ audItem.auditorThird = zhoD[j].auditorThird
|
|
|
+ }
|
|
|
+ if(zhoD[j].ccUserid){
|
|
|
+ audItem.ccUserid = zhoD[j].ccUserid
|
|
|
+ }
|
|
|
+ formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
|
|
|
+ }
|
|
|
zhoD[j].subProjectId ? formData.append("subProjectId", zhoD[j].subProjectId) : formData.append("subProjectId", '0');
|
|
|
formData.append("taskId", 0);
|
|
|
formData.append("reportTimeType", this.reportTimeType.type);
|
|
@@ -4920,6 +4994,22 @@
|
|
|
formData.append("projectId", this.projectList[s].id);
|
|
|
}
|
|
|
}
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ let audItem = {}
|
|
|
+ if(this.user.timeType.auditLevel > 0){
|
|
|
+ audItem.auditorFirst = zhoD[j].auditorFirst
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 1){
|
|
|
+ audItem.auditorSec = zhoD[j].auditorSec
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 2){
|
|
|
+ audItem.auditorThird = zhoD[j].auditorThird
|
|
|
+ }
|
|
|
+ if(zhoD[j].ccUserid){
|
|
|
+ audItem.ccUserid = zhoD[j].ccUserid
|
|
|
+ }
|
|
|
+ formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
|
|
|
+ }
|
|
|
zhoD[j].subProjectId ? formData.append("subProjectId", zhoD[j].subProjectId) : formData.append("subProjectId", '0');
|
|
|
formData.append("taskId", 0);
|
|
|
formData.append("reportTimeType", this.reportTimeType.type);
|
|
@@ -4970,6 +5060,22 @@
|
|
|
formData.append("projectId", this.projectList[s].id);
|
|
|
}
|
|
|
}
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ let audItem = {}
|
|
|
+ if(this.user.timeType.auditLevel > 0){
|
|
|
+ audItem.auditorFirst = zhoD[j].auditorFirst
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 1){
|
|
|
+ audItem.auditorSec = zhoD[j].auditorSec
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 2){
|
|
|
+ audItem.auditorThird = zhoD[j].auditorThird
|
|
|
+ }
|
|
|
+ if(zhoD[j].ccUserid){
|
|
|
+ audItem.ccUserid = zhoD[j].ccUserid
|
|
|
+ }
|
|
|
+ formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
|
|
|
+ }
|
|
|
zhoD[j].subProjectId ? formData.append("subProjectId", zhoD[j].subProjectId) : formData.append("subProjectId", '0')
|
|
|
// formData.append("subProjectId", zhoD[j].subProjectId);
|
|
|
formData.append("taskId", 0);
|
|
@@ -5113,7 +5219,13 @@
|
|
|
state:2,//2-表示待提交
|
|
|
multiWorktime: this.reportTimeType.multiWorktime,
|
|
|
worktimeList:[{}],
|
|
|
- canEdit: true
|
|
|
+ canEdit: true,
|
|
|
+
|
|
|
+
|
|
|
+ auditorFirst: '',
|
|
|
+ auditorSec: '',
|
|
|
+ auditorThird: '',
|
|
|
+ ccUserid: ''
|
|
|
// degreeId: '',
|
|
|
};
|
|
|
if(this.isWeekend && this.user.timeType.lockWorktime != 1){
|
|
@@ -5375,6 +5487,41 @@
|
|
|
}
|
|
|
}
|
|
|
for(var i in this.workForm.domains) {
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ let audItem = {}
|
|
|
+ let auditRule = ''
|
|
|
+ if(this.workForm.domains[i].id){
|
|
|
+ audItem.reportId = this.workForm.domains[i].id
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 0){
|
|
|
+ if(!this.workForm.domains[i].auditorFirst){ auditRule += '第一、' }
|
|
|
+ audItem.auditorFirst = this.workForm.domains[i].auditorFirst
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 1){
|
|
|
+ if(!this.workForm.domains[i].auditorFirst){ auditRule += '第二、' }
|
|
|
+ audItem.auditorSec = this.workForm.domains[i].auditorSec
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 2){
|
|
|
+ if(!this.workForm.domains[i].auditorFirst){ auditRule += '第三、' }
|
|
|
+ audItem.auditorThird = this.workForm.domains[i].auditorThird
|
|
|
+ }
|
|
|
+ if(this.workForm.domains[i].ccUserid){
|
|
|
+ audItem.ccUserid = this.workForm.domains[i].ccUserid
|
|
|
+ }
|
|
|
+ if(auditRule){
|
|
|
+ auditRule = auditRule.substring(0,auditRule.length - 1)
|
|
|
+ this.$message({
|
|
|
+ message: '请指定[' + auditRule + ']审核人',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(this.workForm.domains[i].degreeId) {
|
|
|
// var sss = this.workForm.domains[i].degreeId.toString()
|
|
|
formData.append("degreeId", this.workForm.domains[i].degreeId);
|
|
@@ -5530,7 +5677,8 @@
|
|
|
message: this.$t('message.Pleasespecifyaprojectreviewer'),
|
|
|
type: "error"
|
|
|
});
|
|
|
- } else {
|
|
|
+ return;
|
|
|
+ } else if(this.user.timeType.reportAuditType != 3){
|
|
|
//分组负责人先审核, 确定是选择了任务分组
|
|
|
if (this.workForm.domains[i].taskGroups.length == 0) {
|
|
|
this.$message({
|
|
@@ -5549,8 +5697,9 @@
|
|
|
type: "error"
|
|
|
});
|
|
|
}
|
|
|
+ return;
|
|
|
}
|
|
|
- return;
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
this.submitingReport = true;
|