Commit ec3638d9 authored by 王晓倩's avatar 王晓倩

申请服务时买方不能选择自己部门

parent 06c73b9c
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
<el-form-item label="买方" prop="tradeDeptId"> <el-form-item label="买方" prop="tradeDeptId">
<treeselect <treeselect
v-model="form.tradeDeptId" v-model="form.tradeDeptId"
:options="deptOptions" :options="formDeptOptions"
:show-count="true" :show-count="true"
placeholder="请选择部门" placeholder="请选择部门"
/> />
...@@ -396,6 +396,7 @@ export default { ...@@ -396,6 +396,7 @@ export default {
transactionProjects: [], transactionProjects: [],
deptOptions: [], deptOptions: [],
formDeptOptions: [],
priceType: "1", priceType: "1",
fileList: [], fileList: [],
transactionProjectStatus: [], transactionProjectStatus: [],
...@@ -574,6 +575,20 @@ export default { ...@@ -574,6 +575,20 @@ export default {
getTreeselect() { getTreeselect() {
treeselect().then((response) => { treeselect().then((response) => {
this.deptOptions = response.data; this.deptOptions = response.data;
this.formDeptOptions = response.data;
// 申请服务时买方不能选自己部门
var items = this.formDeptOptions[0].children;
var result = [];
var j=0;
for(var i=0; i<items.length; i++){
if(items[i].id != this.$store.state.user.deptId){
result[j] = items[i];
j++;
}
}
this.formDeptOptions[0].children = result;
console.log("formDeptOptions===",this.formDeptOptions);
}); });
}, },
changeTransactionProject(val) { changeTransactionProject(val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment