|
@@ -44,7 +44,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- 部门筛选 -->
|
|
|
- <el-form-item >
|
|
|
+ <el-form-item v-if="user.timeType.projectWithDept">
|
|
|
<span style="margin-left:5px;margin-right:5px;color:#606266;">部门</span>
|
|
|
<el-cascader v-model="deptId" :options="departmentList" placeholder="请选择部门"
|
|
|
:props="{ checkStrictly: true }" :show-all-levels="false" clearable filterable @change="searchClfList" size="small"
|
|
@@ -153,7 +153,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="projectCategorySub" label="项目分组" width="200" v-if="user.companyId == '428'">
|
|
|
+ <!-- <el-table-column prop="projectCategorySub" label="项目分组" width="200" v-if="user.companyId == '428'">
|
|
|
<template slot-scope="scope">
|
|
|
<div v-if="scope.row.projectSeparate">
|
|
|
<div v-if="scope.row.projectSeparate.projectCategorySub">
|
|
@@ -171,7 +171,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column prop="categoryName" label="项目分类" sortable="custom" width="120"></el-table-column>
|
|
|
<el-table-column prop="projectName" label="项目名称" width="250" sortable="custom">
|
|
|
<template slot-scope="scope">
|
|
@@ -191,7 +191,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="departmentName" label="所属部门" sortable="custom" width="200"></el-table-column>
|
|
|
+ <el-table-column prop="departmentName" label="所属部门" sortable="custom" width="200" v-if="user.timeType.projectWithDept"></el-table-column>
|
|
|
<el-table-column prop="projectMainName" label="主项目" sortable="custom" min-width="250" v-if="user.timeType.mainProjectState == '1'">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="inchargerName" label="项目经理" sortable="custom" min-width="150">
|
|
@@ -385,9 +385,9 @@
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item label="所属部门">
|
|
|
+ <el-form-item label="所属部门" v-if="user.timeType.projectWithDept">
|
|
|
<el-cascader v-model="addForm.deptId" :options="departmentList" placeholder="请选择部门"
|
|
|
- :props="{ checkStrictly: true }" clearable filterable @change="cascaderChange"
|
|
|
+ :props="{ checkStrictly: true }" clearable filterable @change="cascaderChange" style="width: 100%"
|
|
|
></el-cascader>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -2988,7 +2988,11 @@ a {
|
|
|
creatorId: this.user.id,
|
|
|
projectMainId: '',
|
|
|
outputValue: '',
|
|
|
- deptId: []
|
|
|
+ // deptId: []
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.user.timeType.projectWithDept) {
|
|
|
+ this.$set(this.addForm, 'deptId', [])
|
|
|
}
|
|
|
|
|
|
if(this.user.companyId == '936') {
|
|
@@ -3061,12 +3065,14 @@ a {
|
|
|
projectMainId: item.projectMainId,
|
|
|
creatorId: item.creatorId,
|
|
|
outputValue: item.outputValue,
|
|
|
- deptId: array.reverse(),
|
|
|
+ // deptId: array.reverse(),
|
|
|
changeContractReason: ''
|
|
|
}
|
|
|
this.contractAmountOld = item.contractAmount ? item.contractAmount : 0
|
|
|
console.log(this.addForm, '数据')
|
|
|
-
|
|
|
+ if(this.user.timeType.projectWithDept) {
|
|
|
+ this.$set(this.addForm, 'deptId', array.reverse())
|
|
|
+ }
|
|
|
// 判断公司id是否等于936
|
|
|
if(this.user.companyId == '936') {
|
|
|
if(item.projectSeparate) {
|
|
@@ -3372,11 +3378,13 @@ a {
|
|
|
if(this.user.companyId == '428') {
|
|
|
formData.append("projectCategorySub", this.addForm.projectCategorySub ? this.addForm.projectCategorySub : '');
|
|
|
}
|
|
|
- if(this.addForm.deptId != null && this.addForm.deptId != '') {
|
|
|
- formData.append("deptId", this.addForm.deptId[this.addForm.deptId.length - 1])
|
|
|
+ if(this.user.timeType.projectWithDept) {
|
|
|
+ if(this.addForm.deptId != null && this.addForm.deptId != '') {
|
|
|
+ formData.append("deptId", this.addForm.deptId[this.addForm.deptId.length - 1])
|
|
|
+ }
|
|
|
}
|
|
|
// formData.append("associateDegreeNames", listName)
|
|
|
- console.log("addform",this.addForm);
|
|
|
+ // console.log("addform",this.addForm);
|
|
|
// return
|
|
|
this.http.uploadFile(this.port.project.add,formData,
|
|
|
res => {
|
|
@@ -3606,8 +3614,9 @@ a {
|
|
|
}
|
|
|
|
|
|
// 获取部门
|
|
|
- this.getDepartmentList()
|
|
|
-
|
|
|
+ if(this.user.timeType.projectWithDept) {
|
|
|
+ this.getDepartmentList()
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|