Browse Source

新需求

潘超林 3 months ago
parent
commit
c1d6929c71

+ 37 - 0
src/api/manage/share.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+
+export function shareRewardList(query) {
+    return request({
+        url: '/system/shareReward/list',
+        method: 'get',
+        params: query
+    })
+}
+export function shareRewardSave(query) {
+    return request({
+        url: '/system/shareReward/save',
+        method: 'post',
+        data: query
+    })
+}
+export function shareRewardEdit(query) {
+    return request({
+        url: '/system/shareReward/edit',
+        method: 'post',
+        data: query
+    })
+}
+export function batchRemove(query) {
+    return request({
+        url: '/system/shareReward/batchRemove',
+        method: 'post',
+        data: query
+    })
+}
+export function shareRewardDelete(query) {
+    return request({
+        url: '/system/shareReward/delete',
+        method: 'post',
+        data: query
+    })
+}

+ 30 - 0
src/api/marketing/index.js

@@ -0,0 +1,30 @@
+import request from '@/utils/request'
+
+
+export function queryPage(query) {
+    return request({
+        url: '/system/aiMarketing/queryPage',
+        method: 'get',
+        params: query
+    })
+}
+export function selectUserMsg(query) {
+    return request({
+        url: '/system/aiMarketing/selectUserMsg',
+        method: 'get',
+        params: query
+    })
+}
+export function aiMarketingSave(query) {
+    return request({
+        url: '/system/aiMarketing/save',
+        method: 'post',
+        data: query
+    })
+}
+export function aiMarketingInfo(query) {
+    return request({
+        url: '/system/aiMarketing/info/' + query,
+        method: 'get',
+    })
+}

+ 3 - 1
src/layout/components/Sidebar/index.vue

@@ -72,7 +72,9 @@ export default {
   mounted() {
     if (process.env.NODE_ENV === "development") {
     } else {
-      if (this.$store.state.user.name != "17791897817") { //非城东商家,隐藏福利专区商品
+      let list = ["17791897817", "18888790579"];
+      if (!list.includes(this.$store.state.user.name)) {
+        //非城东商家,隐藏福利专区商品
         this.sidebarRouters.forEach((e) => {
           if (e.name == "Product") {
             e.children = e.children.filter((item) => item.name != "Member/index");

+ 38 - 3
src/views/manage/components/periodProductDialog.vue

@@ -73,7 +73,7 @@
             <el-option label="集采预售" value="2"> 集采预售</el-option>
             <el-option label="团批秒杀" value="3">团批秒杀 </el-option>
             <el-option label="清库专区" value="4"> 清库专区</el-option>
-            <el-option label="集采预售" value="5"> 集采预售</el-option>
+            <el-option label="新店福利" value="5"> 新店福利</el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="销售方式" prop="saleModel" v-if="queryParams.spuType == 1">
@@ -90,6 +90,17 @@
             <el-option label="新人福利" value="5"> 新人福利</el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="奖励设置" prop="isShare">
+          <el-select
+            v-model="queryParams.isShare"
+            placeholder="请选择奖励设置"
+            style="width: 240px"
+          >
+            <el-option label="全部" value=""> </el-option>
+            <el-option label="未设置" value="0"> 未设置</el-option>
+            <el-option label="已设置" value="1"> 已设置</el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
             >搜索</el-button
@@ -106,7 +117,13 @@
         @selection-change="handleSelectionChange"
         row-key="id"
       >
-        <el-table-column type="selection" width="55" align="center" />
+        <!-- shareRate -->
+        <el-table-column
+          type="selection"
+          width="55"
+          align="center"
+          :selectable="checkSelectable"
+        />
         <el-table-column label="商品图片" align="center">
           <template slot-scope="scope">
             <el-image
@@ -203,6 +220,17 @@
             }}
           </template>
         </el-table-column>
+        <el-table-column label="奖励设置" align="center">
+          <template slot-scope="scope">
+            {{
+              scope.row.isShare == 0
+                ? "未设置"
+                : scope.row.shareRate + "%"
+                ? scope.row.shareRate + "%"
+                : ""
+            }}
+          </template>
+        </el-table-column>
       </el-table>
       <pagination
         v-show="total > 0"
@@ -237,7 +265,8 @@ export default {
         saleType: "",
         scope: "",
         benefitType: "",
-        isSetAccount: 0,
+        isShare: "",
+        spuType: 0,
       },
       total: 0,
       loading: false,
@@ -256,6 +285,12 @@ export default {
     };
   },
   methods: {
+    checkSelectable(row, index) {
+      console.log(row);
+      if (row.isShare == 0) {
+        return !row.disabled;
+      }
+    },
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },

+ 18 - 18
src/views/manage/periodSetting.vue

@@ -3,7 +3,7 @@
     <div>
       <div class="header">
         <h3>账期设置</h3>
-        <el-button type="primary" size="small" @click="editInfo">编辑</el-button>
+        <!-- <el-button type="primary" size="small" @click="editInfo">编辑</el-button> -->
       </div>
 
       <span style="color: orange"
@@ -37,7 +37,7 @@
             <p>用户需在确认收货后,规定天数内进行付款</p>
           </el-form-item>
         </el-col>
-        <el-col :span="24">
+        <!-- <el-col :span="24">
           <el-form-item label="可使用账期商品" style="margin-top: 30px">
             <el-button
               type="primary"
@@ -178,8 +178,8 @@
             :limit.sync="queryParams.pageSize"
             @pagination="getList"
           />
-        </el-col>
-        <el-col :span="24" style="text-align: center; margin-top: 20px" v-if="showButton">
+        </el-col> -->
+        <el-col :span="24" style="text-align: center; margin-top: 20px" >
           <el-button type="primary" @click="submitForm">保存</el-button>
           <el-button @click="cancel">取消</el-button>
         </el-col>
@@ -200,7 +200,7 @@ export default {
   components: { productDialog },
   data() {
     return {
-      showButton: false,
+      showButton: true,
       form: {},
       rules: {
         enablePaymentDays: [
@@ -296,25 +296,25 @@ export default {
       this.showButton = false;
     },
     submitForm() {
-      if (this.tableData.length < 1 && this.shopInfo.enablePaymentDays == 1) {
-        this.$message.error("请选择可以使用账期的商品!");
-        return;
-      }
-      let ids = [];
-      this.tableData.forEach((e) => {
-        ids.push(e.id);
-      });
+      // if (this.tableData.length < 1 && this.shopInfo.enablePaymentDays == 1) {
+      //   this.$message.error("请选择可以使用账期的商品!");
+      //   return;
+      // }
+      // let ids = [];
+      // this.tableData.forEach((e) => {
+      //   ids.push(e.id);
+      // });
       this.$refs.form.validate((valid) => {
         if (valid) {
           modifyStoreInfo(this.shopInfo).then((res) => {
             if (res.code == 200) {
-              setAccount({ ids: ids.toString(), isSetAccount: 1 }).then((res) => {
-                if (res.code == 200) {
+              // setAccount({ ids: ids.toString(), isSetAccount: 1 }).then((res) => {
+              //   if (res.code == 200) {
                   this.$message.success("保存成功!");
                   this.getInfo();
                   this.showButton = false;
-                }
-              });
+              //   }
+              // });
             }
           });
         } else {
@@ -330,7 +330,7 @@ export default {
       getStoreInfo().then((res) => {
         if (res.code == 200) {
           this.shopInfo = res.data;
-          this.getList();
+          // this.getList();
         }
       });
     },

+ 109 - 0
src/views/manage/shareIndex.vue

@@ -0,0 +1,109 @@
+<template>
+  <div style="padding: 20px">
+    <div>
+      <div class="header">
+        <h3>分享奖励</h3>
+        <el-button type="primary" size="small" @click="addInfo">添加</el-button>
+      </div>
+
+      <span style="color: orange"
+        >*选择店铺商品,设置分享奖励比例,已在发布时设置分享奖励商品,无法在此设置,可取商品管理编辑</span
+      >
+    </div>
+    <div>
+      <el-row
+        style="
+          margin-top: 20px;
+          display: flex;
+          flex-direction: row;
+          flex-wrap: wrap;
+          min-height: 250px;
+        "
+      >
+        <el-col :span="12" v-for="(item, index) in list" :key="index">
+          <el-card class="box-card" style="width: 90%">
+            <div
+              style="
+                display: flex;
+                flex-direction: row;
+                align-items: center;
+                justify-content: space-around;
+              "
+            >
+              {{ item.shareName }}
+              <span>比例:{{ item.proportion }}%</span>
+              <span>已选择商品:{{ item.shareSpuNum }}个</span>
+              <div>
+                <el-button type="text" @click="edit(item)">编辑</el-button>
+                <el-button type="text" @click="remove(item)" style="color: red"
+                  >删除</el-button
+                >
+              </div>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import { shareRewardList, shareRewardDelete } from "@/api/manage/share";
+export default {
+  data() {
+    return {
+      list: [],
+    };
+  },
+  mounted() {
+    this.getList();
+  },
+  methods: {
+    getList() {
+      shareRewardList().then((res) => {
+        if (res.code == 200) {
+          this.list = res.data;
+        }
+      });
+    },
+    edit(item) {
+      let index = this.list.length;
+      this.$router.replace({ path: "/store/manage/shareReward", query: { index, item } });
+    },
+    remove(item) {
+      this.$confirm("是否确认删除该分享规则", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          shareRewardDelete(item).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("删除成功!");
+              this.getList();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    addInfo() {
+      let index = this.list.length;
+      this.$router.replace({ path: "/store/manage/shareReward", query: { index } });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.header {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+</style>

+ 343 - 0
src/views/manage/shareReward.vue

@@ -0,0 +1,343 @@
+<template>
+  <div style="padding: 20px">
+    <div>
+      <div class="header">
+        <h3>{{ form.shareName ? form.shareName : "分享奖励设置" }}</h3>
+      </div>
+
+      <span style="color: orange">*所设置分享奖励比例只对所选商品进行设置!</span>
+    </div>
+
+    <el-form ref="form" :rules="rules" :model="form" label-width="150px">
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="分享奖励(%)" style="margin-top: 30px" prop="proportion">
+            <el-input-number
+              v-model="form.proportion"
+              style="width: 150px"
+              :controls="false"
+              max="100"
+              min="0"
+            ></el-input-number>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="商品" style="margin-top: 30px">
+            <el-button type="primary" size="small" @click="selectProDuct"
+              >选择商品</el-button
+            >
+          </el-form-item>
+          <div style="margin-left: 30px">
+            已选{{ multipleSelection.length }}件
+            <el-button size="small" style="margin-left: 10px" @click="addRemove"
+              >批量移除</el-button
+            >
+          </div>
+
+          <el-table
+            :data="tableData"
+            style="width: 100%; margin-left: 30px"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column type="selection" width="55" align="center" />
+            <el-table-column label="商品图片" align="center">
+              <template slot-scope="scope">
+                <el-image
+                  style="width: 60px; height: 60px"
+                  :src="scope.row.pic"
+                  :preview-src-list="[scope.row.pic]"
+                >
+                </el-image>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="商品名称"
+              align="center"
+              prop="spuName"
+              :show-overflow-tooltip="true"
+            />
+            <el-table-column label="分类" align="center" prop="categoryName" />
+            <el-table-column
+              label="店铺所属分类"
+              align="center"
+              prop="merchantClassifyName"
+            />
+            <el-table-column label="价格" align="center" width="120">
+              <template slot-scope="scope">
+                {{ scope.row.lowestPrice.toFixed(2) }}/{{ scope.row.unit }}
+              </template>
+            </el-table-column>
+            <el-table-column label="起批量" align="center">
+              <template slot-scope="scope">
+                {{ scope.row.lowestPurchase }}{{ scope.row.unit }}
+              </template>
+            </el-table-column>
+            <el-table-column label="预计库存" align="center">
+              <template slot-scope="scope">
+                {{ scope.row.totalPredictStocks ? scope.row.totalPredictStocks : 0
+                }}{{ scope.row.unit }}
+              </template>
+            </el-table-column>
+            <el-table-column label="实际库存" align="center">
+              <template slot-scope="scope">
+                {{ scope.row.totalStocks }}{{ scope.row.unit }}
+              </template>
+            </el-table-column>
+            <el-table-column label="实际销量" align="center" prop="salesVolume">
+            </el-table-column>
+            <el-table-column label="销售方式" align="center">
+              <template slot-scope="scope">
+                <span v-if="scope.row.spuType == 0">
+                  {{
+                    scope.row.saleModel == 1
+                      ? "普通商品"
+                      : scope.row.saleModel == 2
+                      ? "采集预售"
+                      : scope.row.saleModel == 3
+                      ? "团批秒杀"
+                      : scope.row.saleModel == 4
+                      ? "清库专区"
+                      : scope.row.saleModel == 5
+                      ? "新店福利"
+                      : ""
+                  }}
+                </span>
+                <span v-else-if="scope.row.spuType == 1">
+                  {{
+                    scope.row.saleModel == 1
+                      ? "普通商品"
+                      : scope.row.saleModel == 2
+                      ? "预售"
+                      : scope.row.saleModel == 3
+                      ? "团购秒杀"
+                      : scope.row.saleModel == 4
+                      ? "特价"
+                      : scope.row.saleModel == 5
+                      ? "新人福利"
+                      : ""
+                  }}
+                </span>
+                <span v-eles>
+                  {{ scope.row.saleModel == 7 ? "返券商品" : "" }}
+                </span>
+              </template>
+            </el-table-column>
+            <el-table-column label="商品状态" align="center">
+              <template slot-scope="scope">
+                {{
+                  scope.row.spuStatus == 2
+                    ? "售罄"
+                    : scope.row.spuStatus == 0
+                    ? "上架"
+                    : scope.row.spuStatus == 1
+                    ? "下架"
+                    : ""
+                }}
+              </template>
+            </el-table-column>
+
+            <el-table-column
+              v-if="showButton"
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+              width="100"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  @click="remove(scope.row, scope.$index)"
+                  >移除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+
+          <pagination
+            v-show="total > 0"
+            :total="total"
+            :page.sync="queryParams.pageNo"
+            :limit.sync="queryParams.pageSize"
+            @pagination="getList"
+          />
+        </el-col>
+        <el-col :span="24" style="text-align: center; margin-top: 20px" v-if="showButton">
+          <el-button type="primary" @click="submitForm">保存</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
+    <productDialog
+      ref="productDialog"
+      @productDialogInfo="productDialogInfo"
+    ></productDialog>
+  </div>
+</template>
+
+<script>
+import {
+  shareRewardList,
+  shareRewardSave,
+  batchRemove,
+  shareRewardEdit,
+} from "@/api/manage/share";
+import { getGoodsListPage } from "@/api/manage/product";
+import productDialog from "./components/periodProductDialog.vue";
+export default {
+  components: { productDialog },
+  data() {
+    return {
+      showButton: true,
+      form: {
+        proportion: null,
+      },
+      rules: {
+        proportion: [{ required: true, message: "请输入分享奖励比例", trigger: "blur" }],
+      },
+      tableData: [],
+      multipleSelection: [],
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10,
+        isShare: 1,
+        spuIds: null,
+      },
+    };
+  },
+  created() {
+    if (this.$route.query.item) {
+      this.queryParams.spuIds = this.$route.query.item.selectGoodsIds;
+      this.form = this.$route.query.item;
+      this.getList();
+    }
+  },
+  mounted() {},
+  methods: {
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    addRemove() {
+      if (this.multipleSelection.length < 1) {
+        this.$message.error("请先选择要移除的商品!");
+        return false;
+      }
+      let ids = [];
+      this.multipleSelection.forEach((e) => {
+        ids.push(e.id);
+      });
+      this.$confirm("是否移除已选商品,移除后, 该商品不可获得分享奖励", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          batchRemove({
+            // id: this.$route.query.item.id,
+            selectGoodsIds: ids.toString(),
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("移除成功!");
+              this.getList();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    remove(row, index) {
+      this.$confirm("是否移除已选商品,移除后, 该商品不可使用获得分享奖励", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          batchRemove({
+            // id: this.$route.query.item.id,
+            selectGoodsIds: row.id,
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("移除成功!");
+              this.tableData.splice(index, 1);
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    productDialogInfo(list) {
+      this.tableData = [...this.tableData, ...list];
+      this.tableData = this.tableData.filter((item, index, self) => {
+        return self.findIndex((t) => t.id === item.id) === index;
+      });
+    },
+    selectProDuct() {
+      this.$refs.productDialog.openDialog();
+    },
+    submitForm() {
+      console.log(this.tableData);
+      if (this.tableData.length < 1) {
+        this.$message.error("请选择可以获得分享奖励的商品!");
+        return;
+      }
+      let ids = [];
+      this.tableData.forEach((e) => {
+        ids.push(e.id);
+      });
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          if (this.form.id) {
+            this.form.selectGoodsIds = ids.toString();
+            shareRewardEdit(this.form).then((res) => {
+              if (res.code == 200) {
+                this.$message.success("编辑保存成功!");
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.replace({ path: "/store/manage/shareIndex" });
+                this.getList();
+              }
+            });
+          } else {
+            this.form.selectGoodsIds = ids.toString();
+            shareRewardSave(this.form).then((res) => {
+              if (res.code == 200) {
+                this.$message.success("保存成功!");
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.replace({ path: "/store/manage/shareIndex" });
+                this.getList();
+              }
+            });
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    /** 查询参数列表 */
+    getList() {
+      this.loading = true;
+      getGoodsListPage(this.queryParams).then((res) => {
+        this.tableData = res.data.records;
+        this.total = res.data.total;
+        this.loading = false;
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.header {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+</style>

+ 204 - 0
src/views/marketing/components/user-dialog.vue

@@ -0,0 +1,204 @@
+<template>
+  <el-dialog
+    title="选择用户"
+    :visible.sync="dialogVisible"
+    width="80%"
+    :before-close="handleClose"
+  >
+    <div>
+      <el-form
+        :model="queryParams"
+        ref="queryForm"
+        size="small"
+        :inline="true"
+        label-width="120px"
+      >
+        <el-form-item label="" prop="key">
+          <el-input
+            v-model="queryParams.key"
+            placeholder="请输入用户ID,用户昵称搜索"
+            clearable
+            style="width: 240px"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="浏览记录" prop="browseFlag">
+          <el-select
+            v-model="queryParams.browseFlag"
+            placeholder="请选择浏览记录"
+            style="width: 240px"
+          >
+            <el-option label="全部" value=""> </el-option>
+            <el-option label="7天内浏览用户" value="7"> </el-option>
+            <el-option label="30天内浏览用户" value="30"> </el-option>
+            <el-option label="半年内浏览用户" value="180"> </el-option>
+            <el-option label="一年内浏览用户" value="365"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="下单记录" prop="orderFlag">
+          <el-select
+            v-model="queryParams.orderFlag"
+            placeholder="请选择下单记录"
+            style="width: 240px"
+          >
+            <el-option label="全部" value=""> </el-option>
+            <el-option label="30天内下单用户" value="30"> </el-option>
+            <el-option label="半年内下单用户" value="180"> </el-option>
+            <el-option label="一年内下单用户" value="365"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="推送状态" prop="pushStatus">
+          <el-select
+            v-model="queryParams.pushStatus"
+            placeholder="请选择推送状态"
+            style="width: 240px"
+          >
+            <el-option label="全部" value=""> </el-option>
+            <el-option label="未推送" value="0"> </el-option>
+            <el-option label="已推送" value="1"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="领取状态" prop="receiveStatus">
+          <el-select
+            v-model="queryParams.receiveStatus"
+            placeholder="请选择领取状态"
+            style="width: 240px"
+          >
+            <el-option label="全部" value=""> </el-option>
+            <el-option label="未领取" value="0"> </el-option>
+            <el-option label="已领取" value="1"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
+            >搜索</el-button
+          >
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+            >重置</el-button
+          >
+        </el-form-item>
+      </el-form>
+
+      <el-table
+        v-loading="loading"
+        :data="tableList"
+        @selection-change="handleSelectionChange"
+        row-key="id"
+      >
+        <el-table-column type="selection" width="55" align="center" />
+        <el-table-column label="用户ID" align="center" prop="id" />
+        <el-table-column label="用户头像" align="center">
+          <template slot-scope="scope">
+            <el-image
+              style="width: 60px; height: 60px"
+              :src="scope.row.headUrl"
+              :preview-src-list="[scope.row.headUrl]"
+            >
+            </el-image>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="用户昵称" align="center" prop="nick" />
+        <el-table-column label="浏览记录" align="center" prop="browseRecord">
+          <template slot-scope="scope">
+            {{
+              scope.row.browseRecord
+                ? $moment(Number(scope.row.browseRecord)).format("yyyy-MM-DD HH:mm:ss")
+                : ""
+            }}
+          </template>
+        </el-table-column>
+        <!-- <el-table-column label="距离" align="center" width="120" /> -->
+        <el-table-column label="下单记录" align="center" prop="orderRecord">
+          <template slot-scope="scope">
+            {{
+              scope.row.orderRecord
+                ? $moment(Number(scope.row.orderRecord)).format("yyyy-MM-DD HH:mm:ss")
+                : ""
+            }}
+          </template>
+        </el-table-column>
+        <el-table-column label="近期推送记录" align="center" prop="topicName" />
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNo"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="dialogSubmit">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import moment from "moment";
+import * as markApi from "@/api/marketing/index";
+export default {
+  data() {
+    return {
+      dialogVisible: false,
+      queryParams: {
+        browseFlag: "",
+        pageNo: 1,
+        pageSize: 5,
+        orderFlag: "",
+        key: "",
+        pushStatus: "",
+        receiveStatus: "",
+      },
+      total: 0,
+      loading: false,
+      tableList: [],
+      multipleSelection: [],
+    };
+  },
+  methods: {
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    dialogSubmit() {
+      this.$emit("productDialogInfo", this.multipleSelection);
+      this.handleClose();
+    },
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    handleQuery() {
+      this.getList();
+    },
+    /** 查询参数列表 */
+    getList() {
+      this.loading = true;
+      markApi.selectUserMsg(this.queryParams).then((res) => {
+        this.tableList = res.data.records;
+        this.total = res.data.total;
+        this.loading = false;
+      });
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+    openDialog() {
+      this.dialogVisible = true;
+      this.getList();
+    },
+  },
+};
+</script>
+
+<style>
+.el-cascader-panel
+  > .el-scrollbar:first-child
+  > .el-cascader-menu__wrap
+  > .el-cascader-menu__list
+  > .el-cascader-node
+  > .el-radio {
+  display: block;
+}
+</style>

+ 349 - 0
src/views/marketing/index.vue

@@ -0,0 +1,349 @@
+<template>
+  <div style="padding: 20px">
+    <div>
+      <div class="header">
+        <h3>添加新推送</h3>
+      </div>
+
+      <span style="color: orange"
+        >*选择用户,推送消息附带红包,红包数量需与用户人数一致</span
+      >
+    </div>
+    <el-form ref="form" :rules="rules" :model="form" label-width="150px">
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="主题名称" style="margin-top: 30px" prop="topicName">
+            <el-input
+              type="text"
+              placeholder="请输入内容"
+              v-model="form.topicName"
+              maxlength="10"
+              show-word-limit
+              style="width: 300px"
+            >
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="推送红包" style="margin-top: 30px">
+            <span style="color: orange"
+              >设置钱请确认该账户钱包余额是否满足,此次营销所需金额,如不满足请先去充值</span
+            >
+          </el-form-item>
+          <el-form-item label="红包个数" prop="redEnvelopeNum" style="margin-left: 70px">
+            <el-input-number
+              v-model="form.redEnvelopeNum"
+              style="width: 150px"
+              :controls="false"
+              max="100"
+              min="0"
+            ></el-input-number
+            >个
+          </el-form-item>
+          <el-form-item label="单个金额" prop="singleAmount" style="margin-left: 70px">
+            <el-input-number
+              v-model="form.singleAmount"
+              style="width: 150px"
+              :controls="false"
+              max="100"
+              min="0"
+            ></el-input-number
+            >元
+          </el-form-item>
+          <el-form-item
+            label="红包时效"
+            prop="redEnvelopePeriod"
+            style="margin-left: 70px"
+          >
+            <el-input-number
+              v-model="form.redEnvelopePeriod"
+              style="width: 150px"
+              :controls="false"
+              max="100"
+              min="0"
+            ></el-input-number
+            >天
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="推送消息" style="margin-top: 30px" prop="pushMessage">
+            <el-input
+              type="textarea"
+              :rows="3"
+              placeholder="请输入内容"
+              v-model="form.pushMessage"
+              :show-word-limit="true"
+              style="width: 500px"
+              maxlength="100"
+            >
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="选择用户" style="margin-top: 30px">
+            <el-button type="primary" size="small" @click="selectProDuct"
+              >选择用户</el-button
+            >
+          </el-form-item>
+          <div style="margin-left: 30px">
+            已选{{ multipleSelection.length }}人
+            <el-button size="small" style="margin-left: 10px" @click="addRemove"
+              >批量移除</el-button
+            >
+          </div>
+
+          <el-table
+            :data="tableData"
+            style="width: 100%; margin-left: 30px"
+            @selection-change="handleSelectionChange"
+          >
+            <el-table-column type="selection" width="55" align="center" />
+            <el-table-column label="用户ID" align="center" prop="id" />
+            <el-table-column label="用户头像" align="center">
+              <template slot-scope="scope">
+                <el-image
+                  style="width: 60px; height: 60px"
+                  :src="scope.row.headUrl"
+                  :preview-src-list="[scope.row.headUrl]"
+                >
+                </el-image>
+              </template>
+            </el-table-column>
+
+            <el-table-column label="用户昵称" align="center" prop="nick" />
+            <el-table-column label="浏览记录" align="center" prop="browseRecord" />
+            <!-- <el-table-column label="距离" align="center" width="120" /> -->
+            <el-table-column label="下单记录" align="center" prop="orderRecord" />
+            <el-table-column label="近期推送记录" align="center" prop="topicName" />
+            <el-table-column
+              v-if="showButton"
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+              width="100"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  @click="remove(scope.row, scope.$index)"
+                  >移除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+
+          <pagination
+            v-show="total > 0"
+            :total="total"
+            :page.sync="queryParams.pageNo"
+            :limit.sync="queryParams.pageSize"
+            @pagination="getList"
+          />
+        </el-col>
+        <el-col :span="24" style="text-align: center; margin-top: 20px" v-if="showButton">
+          <el-button @click="cancel">取消</el-button>
+          <el-button @click="submitForm" type="primary">保存</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
+    <userDialog ref="productDialog" @productDialogInfo="productDialogInfo"></userDialog>
+  </div>
+</template>
+
+<script>
+import {
+  shareRewardList,
+  shareRewardSave,
+  batchRemove,
+  shareRewardEdit,
+} from "@/api/manage/share";
+
+import * as markApi from "@/api/marketing/index";
+import { getGoodsListPage } from "@/api/manage/product";
+import userDialog from "./components/user-dialog.vue";
+export default {
+  components: { userDialog },
+  data() {
+    return {
+      showButton: true,
+      form: {
+        pushMessage: null,
+        redEnvelopeNum: null,
+        redEnvelopePeriod: null,
+        singleAmount: null,
+        topicName: null,
+        selectUserId: "",
+      },
+      rules: {
+        proportion: [{ required: true, message: "请输入分享奖励比例", trigger: "blur" }],
+      },
+      tableData: [],
+      multipleSelection: [],
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10,
+        isShare: 1,
+        spuIds: null,
+      },
+    };
+  },
+  mounted() {},
+  methods: {
+    cancel() {
+      this.$confirm("是否确认取消,所填写的信息将会消失?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$store.dispatch("tagsView/delView", this.$route); //关闭当前页
+          this.$router.replace({ path: "/marketing/marketing/list" });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消",
+          });
+        });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    addRemove() {
+      if (this.multipleSelection.length < 1) {
+        this.$message.error("请先选择要移除的商品!");
+        return false;
+      }
+      let ids = [];
+      this.multipleSelection.forEach((e) => {
+        ids.push(e.id);
+      });
+      let idlist = JSON.parse(this.form.selectGoodsIds);
+      const diff1 = idlist.filter((item) => !ids.includes(item));
+      this.$confirm("是否移除已选商品,移除后, 该商品不可获得分享奖励", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          batchRemove({
+            id: this.$route.query.item.id,
+            removeGoodsIds: JSON.stringify(ids),
+            selectGoodsIds: JSON.stringify(diff1),
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("移除成功!");
+              this.getList();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    remove(row, index) {
+      let ids = JSON.parse(this.form.selectGoodsIds);
+      ids.forEach((e, index) => {
+        if (e == row.id) {
+          ids.splice(index, 1);
+        }
+      });
+      this.$confirm("是否移除已选商品,移除后, 该商品不可使用获得分享奖励", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          batchRemove({
+            id: this.$route.query.item.id,
+            removeGoodsIds: JSON.stringify([row.id]),
+            selectGoodsIds: JSON.stringify(ids),
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("移除成功!");
+              this.tableData.splice(index, 1);
+
+              // this.getList();
+            }
+          });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
+          });
+        });
+    },
+    productDialogInfo(list) {
+      this.tableData = [...this.tableData, ...list];
+      this.tableData = this.tableData.filter((item, index, self) => {
+        return self.findIndex((t) => t.id === item.id) === index;
+      });
+    },
+    selectProDuct() {
+      this.$refs.productDialog.openDialog();
+    },
+    submitForm() {
+      if (this.tableData.length < 1) {
+        this.$message.error("请选择可以推送的用户!");
+        return;
+      }
+      let ids = [];
+      this.tableData.forEach((e) => {
+        ids.push(e.id);
+      });
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.$confirm("是否确认保存新增?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          })
+            .then(() => {
+              this.form.selectUserId = ids;
+              markApi.aiMarketingSave(this.form).then((res) => {
+                if (res.code == 200) {
+                  this.$message.success("保存成功!");
+                  this.$store.dispatch("tagsView/delView", this.$route);
+                  this.$router.replace({ path: "/marketing/marketing/list" });
+                  this.getList();
+                }
+              });
+            })
+            .catch(() => {
+              this.$message({
+                type: "info",
+                message: "已取消",
+              });
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    /** 查询参数列表 */
+    getList() {
+      this.loading = true;
+      getGoodsListPage(this.queryParams).then((res) => {
+        this.tableData = res.data.records;
+        this.total = res.data.total;
+        this.loading = false;
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+.header {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
+</style>

+ 201 - 0
src/views/marketing/list.vue

@@ -0,0 +1,201 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      label-width="120px"
+    >
+      <el-form-item label="" prop="key">
+        <el-input
+          v-model="queryParams.key"
+          placeholder="输入主题名称关键字搜索"
+          clearable
+          style="width: 240px"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="红包过期时间" prop="queryParams">
+        <el-date-picker
+          v-model="queryParams.redEnvelopeExpire"
+          style="width: 240px"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="redChange"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="推送时间" prop="push">
+        <el-date-picker
+          v-model="queryParams.push"
+          style="width: 240px"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="pushChange"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div style="margin: 10px 0px">
+      <el-button type="primary" size="mini" @click="hanleAdd">添加</el-button>
+    </div>
+
+    <el-table
+      v-loading="loading"
+      :data="configList"
+      @selection-change="handleSelectionChange"
+    >
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column label="主题名称" align="center" prop="topicName" />
+      <el-table-column label="红包个数" align="center" prop="redEnvelopeNum" />
+      <el-table-column label="红包单个金额(元)" align="center" prop="singleAmount" />
+      <el-table-column label="红包总金额(元)" align="center">
+        <template slot-scope="scope">
+          {{ Number(scope.row.singleAmount) * Number(scope.row.redEnvelopeNum) }}
+        </template>
+      </el-table-column>
+      <el-table-column label="红包过期时间" align="center" prop="redEnvelopeExpireTime">
+        <template slot-scope="scope">
+          {{
+            scope.row.redEnvelopeExpireTime
+              ? $moment(Number(scope.row.redEnvelopeExpireTime)).format(
+                  "yyyy-MM-DD HH:mm:ss"
+                )
+              : ""
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="已领取数量(个)" align="center" prop="receiveNum" />
+      <el-table-column label="已领取金额(元)" align="center" prop="receivedAmount" />
+      <el-table-column label="返还金额(元)" align="center" prop="expireAmount" />
+      <el-table-column label="推送消息内容" align="center" prop="pushMessage" />
+      <!-- <el-table-column label="用户数量(个)" align="center" prop="" /> -->
+      <el-table-column label="推送时间" align="center" prop="pushTime">
+        <template slot-scope="scope">
+          {{
+            scope.row.pushTime
+              ? $moment(Number(scope.row.pushTime)).format("yyyy-MM-DD HH:mm:ss")
+              : ""
+          }}
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button size="mini" type="text" @click="handleLookOrder(scope.row)"
+            >查看</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNo"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import * as markApi from "@/api/marketing/index";
+export default {
+  name: "Config",
+  data() {
+    return {
+      loading: true,
+      total: 0,
+      configList: [],
+      title: "",
+      open: false,
+      queryParams: {
+        key: "",
+        push: [],
+        redEnvelopeExpire: [],
+        pageNo: 1,
+        pageSize: 10,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      drawer: false,
+      userid: "",
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    redChange(val) {
+      this.queryParams.redEnvelopeExpireStartTime = val[0];
+      this.queryParams.redEnvelopeExpireEndTime = val[1];
+    },
+    pushChange(val) {
+      this.queryParams.pushStartTime = val[0];
+      this.queryParams.pushEndTime = val[1];
+    },
+    hanleAdd() {
+      this.$router.push({
+        path: "/marketing/marketing/index",
+      });
+    },
+
+    handleLookOrder(record) {
+      this.userid = record.userId;
+      this.drawer = true;
+      this.$router.push({
+        path: "/marketing/marketing/setting",
+        query: {
+          id: record.id,
+        },
+      });
+    },
+
+    /** 查询参数列表 */
+    getList() {
+      console.log();
+      this.loading = true;
+      markApi.queryPage(this.queryParams).then((response) => {
+        this.configList = response.data.records;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNo = 1;
+
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.redEnvelopeExpireStartTime = "";
+      this.queryParams.redEnvelopeExpireEndTime = "";
+      this.queryParams.pushStartTime = "";
+      this.queryParams.pushEndTime = "";
+      this.queryParams.push = [];
+      this.queryParams.redEnvelopeExpire = [];
+
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+  },
+};
+</script>
+<style scoped lang="scss"></style>

+ 281 - 0
src/views/marketing/setting.vue

@@ -0,0 +1,281 @@
+<template>
+  <div class="app-container">
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="推送设置" name="1">
+        <el-form ref="form" :rules="rules" :model="form" label-width="150px">
+          <el-row>
+            <el-col :span="24">
+              <el-form-item label="主题名称" style="margin-top: 30px" prop="topicName">
+                <el-input
+                  type="text"
+                  placeholder="请输入内容"
+                  v-model="form.topicName"
+                  maxlength="10"
+                  show-word-limit
+                  style="width: 300px"
+                  :disabled="disabled"
+                >
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="12">
+              <el-form-item label="推送红包" style="margin-top: 30px"> </el-form-item>
+              <el-form-item
+                label="红包个数"
+                prop="redEnvelopeNum"
+                style="margin-left: 70px"
+              >
+                <el-input-number
+                  v-model="form.redEnvelopeNum"
+                  :disabled="disabled"
+                  style="width: 150px"
+                  :controls="false"
+                  max="100"
+                  min="0"
+                ></el-input-number
+                >个
+              </el-form-item>
+              <el-form-item
+                label="单个金额"
+                prop="singleAmount"
+                style="margin-left: 70px"
+              >
+                <el-input-number
+                  v-model="form.singleAmount"
+                  :disabled="disabled"
+                  style="width: 150px"
+                  :controls="false"
+                  max="100"
+                  min="0"
+                ></el-input-number
+                >元
+              </el-form-item>
+              <el-form-item
+                label="红包时效"
+                prop="redEnvelopePeriod"
+                style="margin-left: 70px"
+              >
+                <el-input-number
+                  v-model="form.redEnvelopePeriod"
+                  :disabled="disabled"
+                  style="width: 150px"
+                  :controls="false"
+                  max="100"
+                  min="0"
+                ></el-input-number
+                >天
+                <span style="margin-left: 20px"
+                  >推送后所设置天数用户未领取,将自动过期,剩余金额原路返回</span
+                >
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="推送消息" style="margin-top: 30px" prop="pushMessage">
+                <el-input
+                  type="textarea"
+                  :rows="3"
+                  placeholder="请输入内容"
+                  v-model="form.pushMessage"
+                  :disabled="disabled"
+                  :show-word-limit="true"
+                  style="width: 500px"
+                  maxlength="100"
+                >
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane label="推送用户" name="2">
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          label-width="120px"
+        >
+          <el-form-item label="" prop="key">
+            <el-input
+              v-model="queryParams.key"
+              placeholder="请输入用户ID,用户昵称搜索"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="浏览记录" prop="browseFlag">
+            <el-select
+              v-model="queryParams.browseFlag"
+              placeholder="请选择浏览记录"
+              style="width: 240px"
+            >
+              <el-option label="全部" value=""> </el-option>
+              <el-option label="7天内浏览用户" value="7"> </el-option>
+              <el-option label="30天内浏览用户" value="30"> </el-option>
+              <el-option label="半年内浏览用户" value="180"> </el-option>
+              <el-option label="一年内浏览用户" value="365"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="下单记录" prop="orderFlag">
+            <el-select
+              v-model="queryParams.orderFlag"
+              placeholder="请选择下单记录"
+              style="width: 240px"
+            >
+              <el-option label="全部" value=""> </el-option>
+              <el-option label="30天内下单用户" value="30"> </el-option>
+              <el-option label="半年内下单用户" value="180"> </el-option>
+              <el-option label="一年内下单用户" value="365"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="推送状态" prop="pushStatus">
+            <el-select
+              v-model="queryParams.pushStatus"
+              placeholder="请选择推送状态"
+              style="width: 240px"
+            >
+              <el-option label="全部" value=""> </el-option>
+              <el-option label="未推送" value="0"> </el-option>
+              <el-option label="已推送" value="1"> </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="handleQuery"
+              >搜索</el-button
+            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+              >重置</el-button
+            >
+          </el-form-item>
+        </el-form>
+
+        <el-table
+          v-loading="loading"
+          :data="tableList"
+          @selection-change="handleSelectionChange"
+          row-key="id"
+        >
+          <el-table-column label="用户ID" align="center" prop="id" />
+          <el-table-column label="用户头像" align="center">
+            <template slot-scope="scope">
+              <el-image
+                style="width: 60px; height: 60px"
+                :src="scope.row.headUrl"
+                :preview-src-list="[scope.row.headUrl]"
+              >
+              </el-image>
+            </template>
+          </el-table-column>
+
+          <el-table-column label="用户昵称" align="center" prop="nick" />
+          <el-table-column label="浏览记录" align="center" prop="browseRecord">
+            <template slot-scope="scope">
+              {{
+                scope.row.browseRecord
+                  ? $moment(Number(scope.row.browseRecord)).format("yyyy-MM-DD HH:mm:ss")
+                  : ""
+              }}
+            </template>
+          </el-table-column>
+          <!-- <el-table-column label="距离" align="center" width="120" /> -->
+          <el-table-column label="下单记录" align="center" prop="orderRecord">
+            <template slot-scope="scope">
+              {{
+                scope.row.orderRecord
+                  ? $moment(Number(scope.row.orderRecord)).format("yyyy-MM-DD HH:mm:ss")
+                  : ""
+              }}
+            </template>
+          </el-table-column>
+          <el-table-column label="近期推送记录" align="center" prop="topicName" />
+          <el-table-column label="领取记录" align="center" prop="receiveStatus">
+            <template slot-scope="scope">
+              {{ scope.row.receiveStatus == 0 ? "未领取" : "已领取" }}
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNo"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+import * as markApi from "@/api/marketing/index";
+export default {
+  name: "Config",
+  data() {
+    return {
+      disabled: true,
+      activeName: "1",
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      total: 0,
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10,
+        phone: "",
+        nick: "",
+      },
+      form: {},
+      userid: "",
+      tableList: [],
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询参数列表 */
+    getList() {
+      this.loading = true;
+      markApi.aiMarketingInfo(this.$route.query.id).then((response) => {
+        if (response.code == 200) {
+          this.form = response.data;
+        }
+      });
+    },
+    handleClick() {
+      if (this.activeName == 2) {
+        this.getTable();
+      }
+    },
+    getTable() {
+      this.loading = true;
+      this.queryParams.id = this.$route.query.id;
+      markApi.selectUserMsg(this.queryParams).then((response) => {
+        if (response.code == 200) {
+          this.tableList = response.data.records;
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNo = 1;
+      this.getTable();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+  },
+};
+</script>
+<style scoped lang="scss"></style>

+ 1 - 1
src/views/product/createProduct.vue

@@ -315,7 +315,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "已取消删除",
+            message: "已取消",
           });
         });
     },

+ 2 - 0
src/views/product/module/basic-info.vue

@@ -365,6 +365,8 @@ export default {
     },
 
     passValue() {
+      console.log(this.form);
+      
       this.form.bannerList = [];
       if (this.bannerList.length > 0) {
         console.log("bannerList", this.bannerList);

+ 1 - 1
src/views/product/module/sales-info.vue

@@ -331,7 +331,7 @@
               </template>
             </el-table-column>
 
-            <el-table-column label="批发价" width="160" v-if="saleType != 4">
+            <el-table-column label="批发价" width="160" v-if="saleType != 4 && saleModel != 1">
               <template slot-scope="scope">
                 <el-input-number
                   :controls="false"