**组成新的数组**
ygstProductsToProducts(list, orgId, orgName) {
let reList = list.map(item => {
return {
productImageUrl: item.pictureUrl,
productSpec: item.itemUnit,
productNetContent: item.netAmount,
productNetContentUnit: item.netAmountUnit,
productLevel: item.specificationLevel,
productInfoId: item.id,
productCode: item.salesSubItemCode,
productName: item.salesSubItemName,
productTypeId: item.salesItemName,// 阳光食堂统一使用 code
productTypeCode: item.salesItemCode,
productTypeName: "",
orgId: orgId,
orgName: orgName,
platform: 1,
checked: false
};
});
this.initTableDataItemsChecked(reList);
return reList;
},
*过滤**
this.selectedProducts = this.selectedProducts.filter(function (ele) {
return ele.productInfoId !== item.productInfoId;
});
网友评论