|
@ -421,7 +421,7 @@ |
|
|
>精选 |
|
|
>精选 |
|
|
</a-button> |
|
|
</a-button> |
|
|
|
|
|
|
|
|
<a-button |
|
|
<a-button v-if="item.PriceTaskUserId" |
|
|
style="margin-left: 10px" |
|
|
style="margin-left: 10px" |
|
|
type="primary" |
|
|
type="primary" |
|
|
@click="setState(item.Id, item.State == 7 ? 6 : 7)" |
|
|
@click="setState(item.Id, item.State == 7 ? 6 : 7)" |
|
@ -670,6 +670,14 @@ export default { |
|
|
res.Data.forEach((item) => { |
|
|
res.Data.forEach((item) => { |
|
|
item.isEdit = false; |
|
|
item.isEdit = false; |
|
|
item.Extensions.forEach((ext) => { |
|
|
item.Extensions.forEach((ext) => { |
|
|
|
|
|
this.initProfits(item,ext) |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
this.datas = res.Data; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
//获取利润率 |
|
|
|
|
|
initProfits(item,ext){ |
|
|
ext.PlatformPoint = parseFloat(item.RivalPrice * 0.05).toFixed(2); |
|
|
ext.PlatformPoint = parseFloat(item.RivalPrice * 0.05).toFixed(2); |
|
|
ext.Profit = |
|
|
ext.Profit = |
|
|
item.RivalPrice - |
|
|
item.RivalPrice - |
|
@ -685,13 +693,9 @@ export default { |
|
|
ext.Profits = 0; |
|
|
ext.Profits = 0; |
|
|
} else { |
|
|
} else { |
|
|
ext.Profits = parseFloat( |
|
|
ext.Profits = parseFloat( |
|
|
(ext.Profit / ext.BuyPrice) * 100 |
|
|
(ext.Profit / (ext.BuyPrice+ext.KDPrice)) * 100 |
|
|
).toFixed(2); |
|
|
).toFixed(2); |
|
|
} |
|
|
} |
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
this.datas = res.Data; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
}, |
|
|
editData(data) { |
|
|
editData(data) { |
|
|
data.isEdit = true; |
|
|
data.isEdit = true; |
|
@ -703,19 +707,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
setData(data) { |
|
|
setData(data) { |
|
|
data.Extensions.forEach((ext) => { |
|
|
data.Extensions.forEach((ext) => { |
|
|
ext.PlatformPoint = parseFloat(data.RivalPrice * 0.05).toFixed(2); |
|
|
this.initProfits(data,ext) |
|
|
ext.Profit = |
|
|
|
|
|
data.RivalPrice - ext.BuyPrice - ext.KDPrice - ext.PlatformPoint; |
|
|
|
|
|
ext.Profit=parseFloat( |
|
|
|
|
|
ext.Profit |
|
|
|
|
|
).toFixed(2); |
|
|
|
|
|
if (ext.BuyPrice == 0) { |
|
|
|
|
|
ext.Profits = 0; |
|
|
|
|
|
} else { |
|
|
|
|
|
ext.Profits = parseFloat((ext.Profit / ext.BuyPrice) * 100).toFixed( |
|
|
|
|
|
2 |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
this.http.post("/HuiYan/teamitems/SetItem", data).then((res) => { |
|
|
this.http.post("/HuiYan/teamitems/SetItem", data).then((res) => { |
|
|
if (res.Success) { |
|
|
if (res.Success) { |
|
|