1.获取到当前的code
type: this.getType(list.stock.type)
2:循环判断
getType(code){
let txt="";
let info= this.stockTypeList.filter(item=>item.code==code);
console.log(info)
if(info.length>0){
txt=info[0].name;
}
return txt; //返回对应的字段
},
1.获取到当前的code
type: this.getType(list.stock.type)
2:循环判断
getType(code){
let txt="";
let info= this.stockTypeList.filter(item=>item.code==code);
console.log(info)
if(info.length>0){
txt=info[0].name;
}
return txt; //返回对应的字段
},