|
@@ -104,7 +104,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<div v-if="listData.businessId" style="margin-bottom: 10px">
|
|
<div v-if="listData.businessId" style="margin-bottom: 10px">
|
|
<p class="p_sty">
|
|
<p class="p_sty">
|
|
- <span style="color: red">注:推荐位最多显示15个商品</span>
|
|
|
|
|
|
+ <!-- <span style="color: red">注:推荐位最多显示15个商品</span> -->
|
|
<el-button :size="size" @click="addList">添加</el-button>
|
|
<el-button :size="size" @click="addList">添加</el-button>
|
|
</p>
|
|
</p>
|
|
<el-table
|
|
<el-table
|
|
@@ -238,6 +238,8 @@ export default {
|
|
disabledBtn: false,
|
|
disabledBtn: false,
|
|
listData: {
|
|
listData: {
|
|
businessId: "",
|
|
businessId: "",
|
|
|
|
+ majorId:"",
|
|
|
|
+ subjectIds:"",
|
|
goodsList: [],
|
|
goodsList: [],
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
@@ -384,12 +386,17 @@ export default {
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
|
|
+ subjectChanges() {
|
|
|
|
+ console.log(123)
|
|
|
|
+ this.$bus.$emit("sendBybus");
|
|
|
|
+ this.$bus.$emit("sendBybusBank");
|
|
|
|
+ },
|
|
submit() {
|
|
submit() {
|
|
if (this.listData.goodsList.length) {
|
|
if (this.listData.goodsList.length) {
|
|
- if (this.listData.goodsList.length > 15) {
|
|
|
|
- this.$message.warning("推荐位最多显示15个商品");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.listData.goodsList.length > 15) {
|
|
|
|
+ // this.$message.warning("推荐位最多显示15个商品");
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
var indexNum = this.listData.goodsList.map((item) => {
|
|
var indexNum = this.listData.goodsList.map((item) => {
|
|
return item.sort;
|
|
return item.sort;
|
|
});
|
|
});
|
|
@@ -416,6 +423,7 @@ export default {
|
|
}
|
|
}
|
|
if (this.statusPop === 0) {
|
|
if (this.statusPop === 0) {
|
|
let data = JSON.parse(JSON.stringify(this.listData));
|
|
let data = JSON.parse(JSON.stringify(this.listData));
|
|
|
|
+ console.log(this.listData,'this.listData');
|
|
this.$api
|
|
this.$api
|
|
.editactivityrecommend(data)
|
|
.editactivityrecommend(data)
|
|
.then((res) => {
|
|
.then((res) => {
|
|
@@ -445,10 +453,10 @@ export default {
|
|
this.$api
|
|
this.$api
|
|
.inquireGoods({
|
|
.inquireGoods({
|
|
businessId: this.listData.businessId,
|
|
businessId: this.listData.businessId,
|
|
- majorId: this.listData.majorId,
|
|
|
|
|
|
+ majorId: this.listData.majorId,
|
|
subjectIdList: this.listData.subjectIds,
|
|
subjectIdList: this.listData.subjectIds,
|
|
status: 1,
|
|
status: 1,
|
|
- goodsType: this.$parent.activeName === "first" ? 1 : 2,
|
|
|
|
|
|
+ goodsTypes: this.$parent.activeName === "first" ? [1,6]: [2],
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.goodsList = res.rows;
|
|
this.goodsList = res.rows;
|