2 Commits

2 changed files with 26 additions and 6 deletions

View File

@ -65,7 +65,7 @@
ref="tree"
:highlight-current="true"
:expand-on-click-node="false"
:data="supplierServiceList"
:data="bigServiceList"
:props="defaultProps">
</el-tree>
</template>
@ -81,6 +81,7 @@
ref="areaCascader"
popper-class="responsive-cascader"
:popper-append-to-body="false"
filterable
clearable></el-cascader>
</template>
</van-field>
@ -143,13 +144,14 @@
areaShow: false,
areaList: [],
supplierServiceList: [],
bigServiceList: [],
defaultProps: {
children: 'children',
label: 'title'
label: 'title',
},
areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false, },
configId: '',
wechatId: '',
wechatId: 'test',
}
},
async mounted() {
@ -250,13 +252,23 @@
_node.map(item => {
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({
id: this.id,
...this.form,
idCardFrontUrl: this.idFrontPhoto,
idCardBackUrl: this.idBackPhoto,
businessLicense: this.companyPhoto,
serviceType: this.$refs.tree.getCheckedKeys().join(','),
serviceType: allArr.join(',') ,
serviceAreaCode: checkArr.join(','),
wechatId: this.wechatId,
});
@ -282,6 +294,11 @@
treeType: 2
});
this.supplierServiceList=res.data
this.bigServiceList = [];
res.data.map(item => {
let obj = {...item, children: null}
this.bigServiceList.push(obj)
})
},
confirmHandle(val){
this.region=[]
@ -551,4 +568,6 @@
font-size: 13px !important;
}
}*/
</style>

View File

@ -256,7 +256,6 @@
:deletable="!disabledShow"
max-count="1"
:preview-size="54"
accept="image "
/>
</div>
<div class="lineBot"></div>
@ -365,6 +364,7 @@ export default {
trailerService: '',//拖车服务
isJoin:'',//是否参与
hasLiabilityInsurance: '', // 有无责任险
liabilityInsuranceAudit: '',
activeIcon: require('@/assets/check.png'),
inactiveIcon: require('@/assets/uncheck.png'),
// result: [],
@ -509,7 +509,7 @@ export default {
},
disabledShow() {
if (this.id) {
return !this.permissonList.includes('hasInsuranceAudit')
return !this.permissonList.includes('hasInsuranceAudit') && [2,3].includes(this.liabilityInsuranceAudit)
} else {
return false
}
@ -812,6 +812,7 @@ export default {
this.vehicleFrontLicensePlate = result.vehicleFrontLicensePlate;
this.hasLiabilityInsurance = result.hasLiabilityInsurance
this.insuranceCorp = result.insuranceCorp;
this.liabilityInsuranceAudit = result.liabilityInsuranceAudit
if(this.insurancePicturePhoto) {
this.insurancePictureFiles = [{url: this.insurancePicturePhoto}]
}