yangdamao 3 yıl önce
ebeveyn
işleme
c74da466bc

+ 7 - 6
src/views/2Cport/referralManageMent/tab1/addGL.vue

@@ -104,7 +104,7 @@
         </el-form-item>
           <div v-if="listData.businessId" style="margin-bottom: 10px">
             <p class="p_sty">
-              <span style="color: red">注:推荐位最多显示15个商品</span>
+              <!-- <span style="color: red">注:推荐位最多显示15个商品</span> -->
               <el-button :size="size" @click="addList">添加</el-button>
             </p>
             <el-table
@@ -393,10 +393,10 @@ export default {
     },
     submit() {
       if (this.listData.goodsList.length) {
-        if (this.listData.goodsList.length > 16) {
-          this.$message.warning("推荐位最多显示15个商品");
-          return;
-        }
+        // if (this.listData.goodsList.length > 16) {
+        //   this.$message.warning("推荐位最多显示15个商品");
+        //   return;
+        // }
         var indexNum = this.listData.goodsList.map((item) => {
           return item.sort;
         });
@@ -412,6 +412,7 @@ export default {
         data.type = this.$parent.activeName === "first" ? 1 : 2;
         this.$api
           .appactivityrecommend(data)
+
           .then((res) => {
             this.$message.success("新增成功");
             this.$parent.search();
@@ -455,7 +456,7 @@ export default {
           majorId: this.listData.majorId,
           subjectIdList: this.listData.subjectIds,
           status: 1,
-          goodsType: this.$parent.activeName === "first" ? 1 : 2,
+          goodsTypes: this.$parent.activeName === "first" ? [1,6] : [2],
         })
         .then((res) => {
           this.goodsList = res.rows;

+ 15 - 7
src/views/2Cport/referralManageMent/tab2/addGL.vue

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