|
|
@ -23,19 +23,14 @@ |
|
|
|
</a-tab-pane> |
|
|
|
</a-tabs> |
|
|
|
|
|
|
|
<a-row :gutter="10" style="margin-bottom:10px"> |
|
|
|
<a-row :gutter="10" style="margin-bottom: 10px"> |
|
|
|
<a-col :span="5"> |
|
|
|
<a-input v-model="catKeyWord" placeholder="搜索品类词"> </a-input> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
<a-col :span="5"> |
|
|
|
<a-input |
|
|
|
v-model="catKeyWord" |
|
|
|
placeholder="搜索品类词" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
<a-col :span="5"> |
|
|
|
<a-button @click="searchDatas">搜索</a-button> |
|
|
|
</a-col> |
|
|
|
<a-col :span="5"> |
|
|
|
<a-button @click="searchDatas">搜索</a-button> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
|
|
|
|
<div class="border"> |
|
|
@ -255,33 +250,68 @@ |
|
|
|
> |
|
|
|
<div style="margin: 0px auto; width: 200px"> |
|
|
|
<div v-if="item.isEdit"> |
|
|
|
<div v-if="item.isRival"> |
|
|
|
|
|
|
|
<a-input |
|
|
|
style="margin-top: 10px" |
|
|
|
v-model="item.RivalTitle" |
|
|
|
placeholder="请输入竞品标题" |
|
|
|
disabled="false" |
|
|
|
placeholder="竞品标题" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
|
|
|
|
<a-input |
|
|
|
style="margin-top: 10px" |
|
|
|
disabled="false" |
|
|
|
v-model="item.RivalPrice" |
|
|
|
placeholder="请输入竞品价格" |
|
|
|
placeholder="竞品价格" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
|
|
|
|
<a-input |
|
|
|
style="margin-top: 10px" |
|
|
|
disabled="false" |
|
|
|
v-model="item.RivalPLCount" |
|
|
|
placeholder="请输入竞品评论数" |
|
|
|
placeholder="竞品评论数" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
|
|
|
|
<a-row |
|
|
|
style="margin-top: 10px"> |
|
|
|
<a-col :span="18"> |
|
|
|
<a-input |
|
|
|
v-model="item.RivalGoodsId" |
|
|
|
placeholder="竞品链接" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
</a-col> |
|
|
|
|
|
|
|
<a-col :span="6"> |
|
|
|
<a-button style="margin-left: 2px;background:#8080FF;color: white;" @click="openItemInfoWeb(item)">查询</a-button> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else> |
|
|
|
|
|
|
|
<a-input |
|
|
|
style="margin-top: 10px" |
|
|
|
v-model="item.RivalGoodsId" |
|
|
|
placeholder="请输入竞品链接" |
|
|
|
v-model="item.RivalPrice" |
|
|
|
placeholder="请输入主观价格" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
|
|
|
|
|
|
|
|
<a-input |
|
|
|
style="margin-top: 10px" |
|
|
|
v-model="item.RivalImg" |
|
|
|
placeholder="请输入图片链接" |
|
|
|
> |
|
|
|
</a-input> |
|
|
|
|
|
|
|
<div style="color:#EC808D;margin-top: 10px;">PS:主观售价不合理。货源团队有权申述</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<div |
|
|
@ -293,11 +323,13 @@ |
|
|
|
" |
|
|
|
> |
|
|
|
<a target="_black" :href="item.RivalGoodsId"> |
|
|
|
|
|
|
|
<img v-if="item.RivalImg" :src="item.RivalImg" width="200" height="165"/> |
|
|
|
<img v-else src="/jp.png" width="200" height="165"/> |
|
|
|
|
|
|
|
|
|
|
|
<img |
|
|
|
v-if="item.RivalImg" |
|
|
|
:src="item.RivalImg" |
|
|
|
width="200" |
|
|
|
height="165" |
|
|
|
/> |
|
|
|
<img v-else src="/jp.png" width="200" height="165" /> |
|
|
|
</a> |
|
|
|
<a-row> |
|
|
|
<a-col :span="12" style="text-align: left" |
|
|
@ -399,11 +431,37 @@ |
|
|
|
</a-row> |
|
|
|
</a-col> |
|
|
|
<a-col :span="4"> |
|
|
|
<a v-if="item.RivalTitle&&!item.isEdit" class="borderNoTop itemtitle" :title="item.RivalTitle">{{ |
|
|
|
item.RivalTitle |
|
|
|
}}</a> |
|
|
|
<a |
|
|
|
v-if="item.RivalTitle && !item.isEdit" |
|
|
|
class="borderNoTop itemtitle" |
|
|
|
:title="item.RivalTitle" |
|
|
|
>{{ item.RivalTitle }}</a> |
|
|
|
|
|
|
|
<a-button v-else-if="item.isEdit" @click="openItemInfoWeb(item)">自动获取对标信息</a-button> |
|
|
|
<div v-else-if="item.isEdit"> |
|
|
|
<a-tag |
|
|
|
:color="item.isRival==true ? '' : '#1E98D7'" |
|
|
|
style="padding: 5px;" |
|
|
|
@click=" |
|
|
|
() => { |
|
|
|
item.isRival = false |
|
|
|
item.isEdit=false |
|
|
|
item.isEdit=true |
|
|
|
} |
|
|
|
" |
|
|
|
>无对标商品</a-tag |
|
|
|
> |
|
|
|
<a-tag |
|
|
|
:color="item.isRival==true ? '#1E98D7' : ''" |
|
|
|
style="padding: 5px;" |
|
|
|
@click=" |
|
|
|
() => { |
|
|
|
item.isRival = true |
|
|
|
item.isEdit=false |
|
|
|
item.isEdit=true |
|
|
|
} |
|
|
|
" |
|
|
|
>自动获取对标信息</a-tag |
|
|
|
></div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</a-col> |
|
|
@ -441,7 +499,7 @@ export default { |
|
|
|
selectedRowKeys: [], |
|
|
|
currentTab: "0", |
|
|
|
lastEditData: undefined, |
|
|
|
catKeyWord:undefined, |
|
|
|
catKeyWord: undefined, |
|
|
|
extFormList: ["以图搜款"], |
|
|
|
stateList: [], |
|
|
|
platformList: [ |
|
|
@ -501,7 +559,7 @@ export default { |
|
|
|
this.currentTab = e; |
|
|
|
this.pagination.current = 1; |
|
|
|
}, |
|
|
|
searchDatas(){ |
|
|
|
searchDatas() { |
|
|
|
this.pagination.current = 1; |
|
|
|
this.getDatas(this.currentTab); |
|
|
|
}, |
|
|
@ -509,37 +567,36 @@ export default { |
|
|
|
this.pagination.current = page; |
|
|
|
this.getDatas(this.currentTab); |
|
|
|
}, |
|
|
|
openItemInfoWeb(item){ |
|
|
|
if(item==undefined||item.RivalGoodsId==undefined||item.RivalGoodsId==null) |
|
|
|
{ |
|
|
|
this.$message.error("请先输入竞品链接!"); |
|
|
|
return |
|
|
|
openItemInfoWeb(item) { |
|
|
|
if ( |
|
|
|
item == undefined || |
|
|
|
item.RivalGoodsId == undefined || |
|
|
|
item.RivalGoodsId == null |
|
|
|
) { |
|
|
|
this.$message.error("请先输入竞品链接!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
hyCoreModel.getItemInfoByUrl(item.RivalGoodsId).then(res=>{ |
|
|
|
var result= JSON.parse(res) |
|
|
|
if(result.success) |
|
|
|
{ |
|
|
|
|
|
|
|
var data=result.data |
|
|
|
item.RivalTitle=data.title |
|
|
|
item.RivalPrice=data.price |
|
|
|
item.RivalPLCount=data.commont |
|
|
|
item.RivalImg=data.img |
|
|
|
console.log(item,'获取的商品信息') |
|
|
|
this.$message.success("获取成功"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
hyCoreModel.getItemInfoByUrl(item.RivalGoodsId).then((res) => { |
|
|
|
var result = JSON.parse(res); |
|
|
|
if (result.success) { |
|
|
|
var data = result.data; |
|
|
|
item.RivalTitle = data.title; |
|
|
|
item.RivalPrice = data.price; |
|
|
|
item.RivalPLCount = data.commont; |
|
|
|
item.RivalImg = data.img; |
|
|
|
console.log(item, "获取的商品信息"); |
|
|
|
this.$message.success("获取成功"); |
|
|
|
} else { |
|
|
|
this.$message.error(result.msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
getDatas(type) { |
|
|
|
var that = this; |
|
|
|
|
|
|
|
var url='/HuiYan/pricetasklog/GetItems' |
|
|
|
if(this.catKeyWord&&this.catKeyWord.length>0) |
|
|
|
{ |
|
|
|
url="/HuiYan/pricetasklog/GetItems?keyword="+this.catKeyWord |
|
|
|
var url = "/HuiYan/pricetasklog/GetItems"; |
|
|
|
if (this.catKeyWord && this.catKeyWord.length > 0) { |
|
|
|
url = "/HuiYan/pricetasklog/GetItems?keyword=" + this.catKeyWord; |
|
|
|
} |
|
|
|
|
|
|
|
this.http |
|
|
@ -576,6 +633,7 @@ export default { |
|
|
|
}, |
|
|
|
editData(data) { |
|
|
|
data.isEdit = true; |
|
|
|
data.isRival=true; |
|
|
|
this.lastEditData = JSON.parse(JSON.stringify(data)); |
|
|
|
}, |
|
|
|
canelEdit(data) { |
|
|
@ -583,11 +641,16 @@ export default { |
|
|
|
Object.assign(data, this.lastEditData); |
|
|
|
}, |
|
|
|
setData(data) { |
|
|
|
var isError = false; |
|
|
|
data.Extensions.forEach((ext) => { |
|
|
|
ext.PlatformPoint = parseFloat(data.RivalPrice * 0.05).toFixed(2); |
|
|
|
ext.Profit = |
|
|
|
data.RivalPrice - ext.BuyPrice - ext.KDPrice - ext.PlatformPoint; |
|
|
|
|
|
|
|
if (ext.BuyUrl == undefined || ext.BuyUrl == "") { |
|
|
|
isError = true; |
|
|
|
} |
|
|
|
|
|
|
|
if (ext.BuyPrice == 0) { |
|
|
|
ext.Profits = 0; |
|
|
|
} else { |
|
|
@ -596,6 +659,12 @@ export default { |
|
|
|
); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
if (isError) { |
|
|
|
this.$message.error("请输入5个供应商来源信息!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.http.post("/HuiYan/teamitems/SetItem", data).then((res) => { |
|
|
|
if (res.Success) { |
|
|
|
this.$message.success("操作成功!"); |
|
|
|