|
@@ -62,8 +62,8 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="上级部门" prop="ParentDepId">
|
|
|
- <el-select v-model="addData.ParentDepId" placeholder="请选择上级部门">
|
|
|
+ <el-form-item label="上级部门" prop="parentDepId">
|
|
|
+ <el-select v-model="addData.parentDepId" placeholder="请选择上级部门">
|
|
|
<el-option v-for="item in optionsDepartment" :key="item.value" :label="item.label"
|
|
|
:value="item.value">
|
|
|
</el-option>
|
|
@@ -98,9 +98,9 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="上级部门" prop="ParentDepId">
|
|
|
- <el-select v-model="upData.ParentDepId" placeholder="请选择上级部门">
|
|
|
- <el-option v-for="item in optionsDepartment" :key="item.value" :label="item.label"
|
|
|
+ <el-form-item label="上级部门" prop="parentDepId">
|
|
|
+ <el-select v-model="upData.parentDepId" placeholder="请选择上级部门" clearable>
|
|
|
+ <el-option v-for="item in optionsDepartment" :key="item.value" :label="item.label"
|
|
|
:value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -138,7 +138,7 @@ export default {
|
|
|
CompanyId: '',
|
|
|
DepCode: "",
|
|
|
DepName: "",
|
|
|
- ParentDepId: 0,
|
|
|
+ parentDepId: 0,
|
|
|
Remark: ""
|
|
|
},
|
|
|
//添加参数
|
|
@@ -146,7 +146,7 @@ export default {
|
|
|
CompanyId: '',
|
|
|
DepCode: "",
|
|
|
DepName: "",
|
|
|
- ParentDepId: 0,
|
|
|
+ parentDepId: 0,
|
|
|
CreateUserId: this.userId,
|
|
|
Remark: ""
|
|
|
},
|
|
@@ -163,7 +163,6 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
optionsDepartment: [],
|
|
|
- ParentDepId: '',
|
|
|
optionsCompanys: [],
|
|
|
CompanyId: ''
|
|
|
}
|
|
@@ -292,9 +291,9 @@ export default {
|
|
|
this.upData.DepCode = row.depCode
|
|
|
this.upData.DepName = row.depName
|
|
|
if (row.parentDepId == 0) {
|
|
|
- this.upData.ParentDepId = ''
|
|
|
+ this.upData.parentDepId = ''
|
|
|
} else {
|
|
|
- this.upData.ParentDepId = row.parentDepId
|
|
|
+ this.upData.parentDepId = row.parentDepId
|
|
|
}
|
|
|
|
|
|
this.upData.Remark = row.remark
|
|
@@ -309,7 +308,7 @@ export default {
|
|
|
that.$message.error("部门名称不能为空");
|
|
|
return
|
|
|
}
|
|
|
- if (that.upData.DepCode == "") {
|
|
|
+ if (that.upData.DepCode == '') {
|
|
|
that.$message.error("部门code不能为空");
|
|
|
return
|
|
|
}
|
|
@@ -317,6 +316,11 @@ export default {
|
|
|
that.$message.error("请选择所属公司");
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ if(that.upData.parentDepId=="")
|
|
|
+ {
|
|
|
+ that.upData.parentDepId=0;
|
|
|
+ }
|
|
|
var url = "/api/System/EditDepartment"
|
|
|
|
|
|
that.$axios({
|
|
@@ -436,7 +440,7 @@ export default {
|
|
|
that.addData.CompanyId = 0;
|
|
|
that.addData.DepCode = "";
|
|
|
that.addData.DepName = "";
|
|
|
- that.addData.ParentDepId = 0;
|
|
|
+ that.addData.parentDepId = 0;
|
|
|
that.addData.CreateUserId = this.userId;
|
|
|
that.addData.Remark = "";
|
|
|
} else {
|