CRM_25-11-18#story#7552,服务商体系新增潜在服务商--曹智龙
This commit is contained in:
@ -65,7 +65,7 @@
|
|||||||
ref="tree"
|
ref="tree"
|
||||||
:highlight-current="true"
|
:highlight-current="true"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:data="supplierServiceList"
|
:data="bigServiceList"
|
||||||
:props="defaultProps">
|
:props="defaultProps">
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</template>
|
</template>
|
||||||
@ -81,6 +81,7 @@
|
|||||||
ref="areaCascader"
|
ref="areaCascader"
|
||||||
popper-class="responsive-cascader"
|
popper-class="responsive-cascader"
|
||||||
:popper-append-to-body="false"
|
:popper-append-to-body="false"
|
||||||
|
filterable
|
||||||
clearable></el-cascader>
|
clearable></el-cascader>
|
||||||
</template>
|
</template>
|
||||||
</van-field>
|
</van-field>
|
||||||
@ -143,13 +144,14 @@
|
|||||||
areaShow: false,
|
areaShow: false,
|
||||||
areaList: [],
|
areaList: [],
|
||||||
supplierServiceList: [],
|
supplierServiceList: [],
|
||||||
|
bigServiceList: [],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'title'
|
label: 'title',
|
||||||
},
|
},
|
||||||
areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false, },
|
areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false, },
|
||||||
configId: '',
|
configId: '',
|
||||||
wechatId: '',
|
wechatId: 'test',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -250,13 +252,23 @@
|
|||||||
_node.map(item => {
|
_node.map(item => {
|
||||||
checkArr.push(item.data.id)
|
checkArr.push(item.data.id)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let treeArr = this.$refs.tree.getCheckedKeys();
|
||||||
|
let childrenTreeArr = [];
|
||||||
|
treeArr.map(item => {
|
||||||
|
let _arr = this.supplierServiceList.filter(_item => _item.id == item) || [] // 获取对应的大类
|
||||||
|
_arr[0]?.children?.map(childItem => {
|
||||||
|
childrenTreeArr?.push(childItem?.id)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
let allArr = [...treeArr, ...childrenTreeArr]
|
||||||
let res = await saveSupplier({
|
let res = await saveSupplier({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
...this.form,
|
...this.form,
|
||||||
idCardFrontUrl: this.idFrontPhoto,
|
idCardFrontUrl: this.idFrontPhoto,
|
||||||
idCardBackUrl: this.idBackPhoto,
|
idCardBackUrl: this.idBackPhoto,
|
||||||
businessLicense: this.companyPhoto,
|
businessLicense: this.companyPhoto,
|
||||||
serviceType: this.$refs.tree.getCheckedKeys().join(','),
|
serviceType: allArr.join(',') ,
|
||||||
serviceAreaCode: checkArr.join(','),
|
serviceAreaCode: checkArr.join(','),
|
||||||
wechatId: this.wechatId,
|
wechatId: this.wechatId,
|
||||||
});
|
});
|
||||||
@ -282,6 +294,11 @@
|
|||||||
treeType: 2
|
treeType: 2
|
||||||
});
|
});
|
||||||
this.supplierServiceList=res.data
|
this.supplierServiceList=res.data
|
||||||
|
this.bigServiceList = [];
|
||||||
|
res.data.map(item => {
|
||||||
|
let obj = {...item, children: null}
|
||||||
|
this.bigServiceList.push(obj)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
confirmHandle(val){
|
confirmHandle(val){
|
||||||
this.region=[]
|
this.region=[]
|
||||||
@ -551,4 +568,6 @@
|
|||||||
font-size: 13px !important;
|
font-size: 13px !important;
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user