|
@@ -475,6 +475,18 @@
|
|
|
<el-input :disabled="!domain.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">{{$t('time.hour')}}</span>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="填报部门" v-if="user.timeType.userWithMultiDept == 1">
|
|
|
+ <el-select v-model="domain.reportTargetDeptId" :placeholder="'请选择部门'" style="width:200px;" :clearable="true" v-if="user.userNameNeedTranslate == 0">
|
|
|
+ <el-option v-for="depts in userReportDeptList" :key="depts.departmentId" :value="depts.departmentId" :label="depts.departmentName">
|
|
|
+ <span style="float: left">
|
|
|
+ <TranslationOpenDataText type='departmentName' :openid='depts.departmentName'></TranslationOpenDataText>
|
|
|
+ </span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <vueCascader :size="'medium'" :widthStr="'200'" :clearable="true" :other="index" :subjectId="domain.reportTargetDeptId" :subject="userReportDeptList" :radios="false" :distinction="'10'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<el-form-item :label="$t('screening.inputProject')" :prop="'domains.' + index + '.projectId'"
|
|
|
:rules="{ required: true, message: $t('defaultText.pleaseSelectSnItem'), trigger: ['change','blur'] }">
|
|
@@ -2404,6 +2416,8 @@
|
|
|
pushWorkTimeLogDig:false,
|
|
|
pushWorkTimeLogData:[],
|
|
|
WorktimeDatepickValueForMonth:[],
|
|
|
+
|
|
|
+ userReportDeptList: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -2461,6 +2475,9 @@
|
|
|
if (this.user.company.packageProject == 1) {
|
|
|
this.getBasecostItemList();
|
|
|
}
|
|
|
+ if(this.user.timeType.userWithMultiDept == 1) {
|
|
|
+ this.getDeptMembData();
|
|
|
+ }
|
|
|
if(this.user.timeType.lockWorktime){
|
|
|
this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
|
|
|
}
|
|
@@ -2489,6 +2506,25 @@
|
|
|
const isReportPictureRequired = permissionArray.some(item => item.id == companyId)
|
|
|
return isReportPictureRequired
|
|
|
},
|
|
|
+ // 获取如何信息选的可填写部门
|
|
|
+ getDeptMembData() {
|
|
|
+ this.http.post('/user/getUserInfo', {userId: this.user.id}, res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ let lists = res.data.userReportDeptList || []
|
|
|
+ const optimizedList = lists.map(item => ({
|
|
|
+ ...item,
|
|
|
+ label: item.departmentName,
|
|
|
+ value: item.departmentId,
|
|
|
+ }));
|
|
|
+ this.$set(this, 'userReportDeptList', optimizedList || []);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },error => { });
|
|
|
+ },
|
|
|
//任务被选中
|
|
|
onTaskSelected(domainItem) {
|
|
|
//取服务
|
|
@@ -7910,7 +7946,7 @@
|
|
|
formData.append("progress", this.workForm.domains[i].progress);
|
|
|
formData.append("workingTime", this.workForm.domains[i].workingTime);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if(this.user.timeType.choseFromAlbum == 1 ) {
|
|
|
console.log(this.workForm.domains[i].imgList)
|
|
|
if(this.workForm.domains[i].imgList) {
|
|
@@ -8071,6 +8107,10 @@
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if(this.user.timeType.userWithMultiDept == 1) {
|
|
|
+ formData.append('reportTargetDeptId', this.workForm.domains[i].reportTargetDeptId || '');
|
|
|
+ }
|
|
|
}
|
|
|
this.submitingReport = true;
|
|
|
this.http.uploadFile( this.port.report.editPort, formData,
|
|
@@ -8289,6 +8329,11 @@
|
|
|
arr.push(obj.item.value)
|
|
|
this.exportParam.departmentId = arr
|
|
|
}
|
|
|
+
|
|
|
+ if(obj.distinction == '10' && obj) {
|
|
|
+ const { id, other } = obj
|
|
|
+ this.workForm.domains[other].reportTargetDeptId = id
|
|
|
+ }
|
|
|
},
|
|
|
//分页
|
|
|
handleCurrentChange(val) {
|