|
@@ -18,9 +18,16 @@
|
|
|
<div class="el-form-item-msg"></div>
|
|
<div class="el-form-item-msg"></div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="推广团购商品" v-if="mode == 'goods'">
|
|
<el-form-item label="推广团购商品" v-if="mode == 'goods'">
|
|
|
- <el-button type="default" @click="quickGoods" v-if="goodsData.length > 0">一键设置佣金</el-button>
|
|
|
|
|
|
|
+ <div class="flex-loading" v-if="loading && goodsData.length == 0">
|
|
|
|
|
+ <el-card shadow="never">
|
|
|
|
|
+ <el-skeleton :rows="5" animated></el-skeleton>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ <el-card shadow="never" style="margin-top: 15px;">
|
|
|
|
|
+ <el-skeleton animated></el-skeleton>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </div>
|
|
|
<div class="goods-live" v-if="goodsData.length>0">
|
|
<div class="goods-live" v-if="goodsData.length>0">
|
|
|
- <scTable ref="starTable" :data="goodsData" row-key="id" height="300" hidePagination hideDo style="width: 750px;">
|
|
|
|
|
|
|
+ <scTable ref="starTable" :data="goodsData" row-key="id" height="500" hidePagination hideDo style="width: 750px;">
|
|
|
<el-table-column label="商品信息" width="340" prop="name" fixed="left">
|
|
<el-table-column label="商品信息" width="340" prop="name" fixed="left">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div class="goods-img">
|
|
<div class="goods-img">
|
|
@@ -51,7 +58,12 @@
|
|
|
<div class="el-form-item-msg">预估每单佣金 {{ scope.row.rate_money }}</div>
|
|
<div class="el-form-item-msg">预估每单佣金 {{ scope.row.rate_money }}</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="商品类型" prop="types" width="100"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column label="商品类型" prop="types" width="100">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.goods.types">{{ scope.row.goods.types }}</span>
|
|
|
|
|
+ <span v-else>不限</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="价格" width="200" prop="id">
|
|
<el-table-column label="价格" width="200" prop="id">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div class="price">{{ $TOOL.moneyFormat(scope.row.goods.price) }}</div>
|
|
<div class="price">{{ $TOOL.moneyFormat(scope.row.goods.price) }}</div>
|
|
@@ -73,6 +85,105 @@
|
|
|
<div class="status-danger" v-if="scope.row.goods.status==0"><sc-status-indicator type="danger"></sc-status-indicator> 审核中</div>
|
|
<div class="status-danger" v-if="scope.row.goods.status==0"><sc-status-indicator type="danger"></sc-status-indicator> 审核中</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" width="100" align="left" fixed="right">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-button-group>
|
|
|
|
|
+ <el-button type="danger" size="small" @click="aloneSave(scope.row)">保存</el-button>
|
|
|
|
|
+ </el-button-group>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </scTable>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="指定带货达人" v-if="mode == 'star'">
|
|
|
|
|
+ <el-button type="default" @click="addStar" v-if="starData.length>0">添加达人({{ starData.length }}/200)</el-button>
|
|
|
|
|
+ <div class="flex-loading" v-if="loading && starData.length == 0">
|
|
|
|
|
+ <el-card shadow="never">
|
|
|
|
|
+ <el-skeleton :rows="5" animated></el-skeleton>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ <el-card shadow="never" style="margin-top: 15px;">
|
|
|
|
|
+ <el-skeleton animated></el-skeleton>
|
|
|
|
|
+ </el-card>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="goods-live" v-if="starData.length>0">
|
|
|
|
|
+ <scTable ref="starTable" :data="starData" row-key="id" height="500" hidePagination hideDo style="width: 750px;">
|
|
|
|
|
+ <el-table-column label="达人" width="340" prop="name" fixed="left">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div class="goods-img">
|
|
|
|
|
+ <div class="img">
|
|
|
|
|
+ <el-image
|
|
|
|
|
+ style="width: 54px; height: 54px"
|
|
|
|
|
+ :src="scope.row.star.avatar_url"
|
|
|
|
|
+ :zoom-rate="1.2"
|
|
|
|
|
+ :max-scale="7"
|
|
|
|
|
+ :min-scale="0.2"
|
|
|
|
|
+ :preview-src-list="[scope.row.star.avatar_url]"
|
|
|
|
|
+ preview-teleported
|
|
|
|
|
+ z-index="999"
|
|
|
|
|
+ fit="cover"></el-image>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="name">
|
|
|
|
|
+ <span>{{ scope.row.star.show_nickname }}</span>
|
|
|
|
|
+ <span class="dec">抖音号:{{ scope.row.star.unique_id }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="粉丝数" width="200" prop="id">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div class="price">{{ scope.row.star.fans_count }}</div>
|
|
|
|
|
+ <div class="goods-price">
|
|
|
|
|
+ <span v-for="value in scope.row.star.fans_tag_list">{{ value }}</span></div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="本地粉丝数" width="120" prop="id">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div class="price">{{ scope.row.star.local_fans_count }}</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="视频带货力" prop="category_id" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.star.talent_item_level_display">{{ scope.row.star.talent_item_level_display }}</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="直播带货力" prop="talent_live_level_display" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.star.talent_live_level_display">{{ scope.row.star.talent_live_level_display }}</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="内容力" prop="category_id" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.star.content_level_display">{{ scope.row.star.content_level_display }}</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="信用分" prop="category_id" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.star.credit_score_display">{{ scope.row.star.credit_score_display }}</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="视频榜" prop="category_id" width="120">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span v-if="scope.row.star.rank_display">{{ scope.row.star.city_name }} 第{{ scope.row.star.rank_display }}名</span>
|
|
|
|
|
+ <span v-else>-</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="状态" prop="enable" width="120" align="center">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <div class="status-success" v-if="scope.row.star.status==1"><sc-status-indicator type="success"></sc-status-indicator> 正常</div>
|
|
|
|
|
+ <div class="status-danger" v-if="scope.row.star.status==2"><sc-status-indicator type="danger"></sc-status-indicator> 禁用</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column label="操作" width="100" align="left" fixed="right">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-button-group>
|
|
|
|
|
+ <el-button type="danger" :disabled="scope.row.id?'true':'false'" text size="small" @click="removeStar(scope.$index)">删除</el-button>
|
|
|
|
|
+ </el-button-group>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</scTable>
|
|
</scTable>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -113,21 +224,40 @@ export default {
|
|
|
//表单注入数据
|
|
//表单注入数据
|
|
|
setData(data){
|
|
setData(data){
|
|
|
this.formData = JSON.parse(JSON.stringify(data));
|
|
this.formData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
+ this.goodsData = []
|
|
|
|
|
+ this.starData = []
|
|
|
this.getDetail()
|
|
this.getDetail()
|
|
|
},
|
|
},
|
|
|
async getDetail(){
|
|
async getDetail(){
|
|
|
|
|
+ this.loading = true;
|
|
|
var resp = await this.$API.merPlan.detail.get({"id":this.formData.id});
|
|
var resp = await this.$API.merPlan.detail.get({"id":this.formData.id});
|
|
|
|
|
+ this.loading = false;
|
|
|
if (resp.code == 0) {
|
|
if (resp.code == 0) {
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
return this.$message.error(resp.msg);
|
|
return this.$message.error(resp.msg);
|
|
|
}
|
|
}
|
|
|
- this.goodsData = resp.data.goods
|
|
|
|
|
|
|
+ var goodsData = resp.data.goods;
|
|
|
|
|
+ goodsData.forEach((item)=>{
|
|
|
|
|
+ item.rate_money = this.$TOOL.moneyFormat(parseFloat(item.commission_rate) * item.goods.price / 100);
|
|
|
|
|
+ })
|
|
|
|
|
+ this.goodsData = goodsData
|
|
|
this.starData = resp.data.star
|
|
this.starData = resp.data.star
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ setRate(index){
|
|
|
|
|
+ const goods = this.goodsData[index];
|
|
|
|
|
+ if (parseFloat(goods.commission_rate) > 29) {
|
|
|
|
|
+ this.goodsData[index].commission_rate = 0;
|
|
|
|
|
+ this.goodsData[index].rate_money = 0;
|
|
|
|
|
+ return ;
|
|
|
|
|
+ }
|
|
|
|
|
+ const rateMoney = this.$TOOL.moneyFormat(parseFloat(goods.commission_rate) * goods.goods.price / 100);
|
|
|
|
|
+ this.goodsData[index].rate_money = rateMoney;
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
<style>
|
|
|
.goods-live{width: 100%;margin-top: 10px;}
|
|
.goods-live{width: 100%;margin-top: 10px;}
|
|
|
|
|
+.flex-loading{display: flex;flex-direction: column;flex: 1;}
|
|
|
</style>
|
|
</style>
|