Tang 2 éve
szülő
commit
eff1a7978e

+ 1 - 1
.env.staging

@@ -10,7 +10,7 @@ ENV = 'staging'
 # 测试
 VUE_APP_BASE_API = 'http://192.168.1.222:7077/'
 # 预发布
-VUE_APP_BASE_API1 = 'http://120.79.166.78:19007/'
+VUE_APP_BASE_API1 = 'http://192.168.1.222:8077/'
 #图片
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 

+ 2 - 1
src/api/api.js

@@ -89,11 +89,12 @@ import integral from "../fxApi/integral"//商户列表
 import vipUser from "../fxApi/vipUser"//会员列表
 import configKey from "../fxApi/configKey"//积分规则
 import merchant from "../fxApi/merchant"//合作商户
-
+import goodsClassification from '../fxApi/goodsClassification'//商户分类
 
 
 // 导入对应模块------------------------
 export default {
+    ...goodsClassification,
     ...merchant,
     ...configKey,
     ...vipUser,

+ 17 - 0
src/components/searchBoxNew.vue

@@ -171,6 +171,22 @@
               :value="items.merId"
             ></el-option>
           </el-select>
+          <!-- 商户店铺列表 -->
+          <el-select
+            v-else-if="item.scope === 'storeList'"
+            v-model="formData[item.prop]"
+            :placeholder="item.placeholder"
+            :size="size"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="(items, indexs) in storeList"
+              :key="indexs"
+              :label="items.storeName"
+              :value="items.storeId"
+            ></el-option>
+          </el-select>
           <!-- 机构列表 -->
           <el-select
             v-else-if="item.scope === 'systemtenantlist'"
@@ -753,6 +769,7 @@ export default {
       "systemtenantlist",
       "roleList",
       "merList",
+      "storeList",
     ]),
     /**
      * @remarks 过滤选择器列表

+ 43 - 0
src/fxApi/goodsClassification.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request' //引入axios请求及拦截器
+export default {
+    //新增类目
+    addmallgoodscategorysave(data) {
+        return request({
+            url: '/mall/goods/category/save', 
+            method: 'post',
+            data
+        })
+    },
+    //修改类目
+    editmallgoodscategorysave(data) {
+        return request({
+            url: '/mall/goods/category/update',
+            method: 'post',
+            data
+        })
+    },
+    //查询类目列表
+    mallgoodscategorylist(data) {
+        return request({
+            url: '/mall/goods/category/list',
+            method: 'get',
+            params: data
+        })
+    },
+    //类目树
+    mallgoodscategorytree(data) {
+        return request({
+            url: '/mall/goods/category/tree',
+            method: 'get',
+            params: data
+        })
+    },
+    //批量删除类目
+    mallgoodscategorybatchdel(data) {
+        return request({
+            url: '/mall/goods/category/batch/del',
+            method: 'post',
+            data
+        })
+    },
+}

+ 7 - 7
src/layout/components/Navbar.vue

@@ -183,13 +183,13 @@ export default {
     },
   },
   mounted() {
-    // if (this.$route.name !== "StationLetter") {
-    //   this.$api.inquireinformsys_userinformUnReadSum().then((res) => {
-    //     if (res.data > 0) {
-    //       this.getDontReadList();
-    //     }
-    //   });
-    // }
+    if (this.$route.name !== "StationLetter") {
+      this.$api.inquireinformsys_userinformUnReadSum().then((res) => {
+        if (res.data > 0) {
+          this.getDontReadList();
+        }
+      });
+    }
   },
   methods: {
     /**

+ 8 - 0
src/store/getters.js

@@ -29,6 +29,14 @@ const getters = {
     }
     return state.dict.indexnum
   },
+  storeList(state) {
+    if (!state.dict.storeList) {
+      api.mallstorelist({ status: 1 }).then(res => {
+        state.dict.storeList = res.rows
+      })
+    }
+    return state.dict.storeList
+  },
   merList(state) {
     if (!state.dict.merList) {
       api.mallmerchantlist({ status: 1 }).then(res => {

+ 7 - 0
src/store/modules/dict.js

@@ -33,8 +33,15 @@ const state = {
   indexnum: null,//模拟
   systemtenantlist: null,//机构列表
   merList: null,//店铺管理列表
+  storeList:null,//商户管理列表
 }
 const mutations = {
+  //商户管理列表
+  STORELIST(state) {
+    api.mallstorelist({ status: 1 }).then(res => {
+      state.storeList = res.rows
+    })
+  },
   //店铺管理列表
   MERLIST(state) {
     api.mallmerchantlist({ status: 1 }).then(res => {

+ 2 - 2
src/utils/request.js

@@ -7,9 +7,9 @@ import { paramMate } from "@/utils/common";
 
 axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
 // 创建axios实例
-export const baseURL = process.env.VUE_APP_BASE_API
+// export const baseURL = process.env.VUE_APP_BASE_API
 // export const baseURL = 'https://ptapi.gdzzkj.net/'
-// export const baseURL = "http://192.168.1.24:7077/";
+export const baseURL = "http://192.168.1.24:7077/";
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API;
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 1 - 0
src/views/financed/orderManageList/index.vue

@@ -384,6 +384,7 @@ export default {
           hidden: true,
           scope: "solt",
           soltName: "orderInfo",
+          width: "300px",
         },
         {
           label: "订单金额(元)",

+ 510 - 0
src/views/financed/stationLetter/index.vue

@@ -0,0 +1,510 @@
+<template>
+  <div id="stationLetter">
+    <div style="margin-bottom: 10px">
+      <p>
+        共{{ total }}封,其中<span style="color: red">{{ dontRead }}</span>
+        个消息未读
+      </p>
+      <div>
+        <el-button size="mini" type="primary" plain @click="haveRead"
+          >标记为已读</el-button
+        ><el-button
+          v-if="false"
+          size="mini"
+          type="primary"
+          plain
+          @click="notHaveRead"
+          >标记为未读</el-button
+        ><span style="font-size: 14px; margin-left: 10px">状态:</span
+        ><el-select
+          size="mini"
+          v-model="formData.receiptStatus"
+          placeholder="请选择状态"
+          @change="changeStatus"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </div>
+    </div>
+    <el-table
+      :data="tableData"
+      style="width: 100%"
+      border
+      row-key="id"
+      ref="tableData"
+    >
+      <el-table-column
+        type="selection"
+        width="55"
+        align="center"
+        reserve-selection
+        :selectable="canSelect"
+      >
+      </el-table-column>
+
+      <template v-for="(item, index) in tableSet">
+        <el-table-column
+          :width="item.width"
+          :key="index"
+          :label="item.label"
+          align="center"
+          :sortable="item.prop === 'sort'"
+          :show-overflow-tooltip="true"
+          header-align="center"
+          :prop="item.prop"
+          sort-by="sort"
+        >
+          <template slot-scope="scope">
+            <i
+              v-if="item.scope === 'icon'"
+              :style="
+                scope.row[item.prop] === 0
+                  ? 'color:#409EFF;'
+                  : scope.row[item.prop] === 1
+                  ? 'color:#eee;'
+                  : ''
+              "
+              style="font-size: 18px"
+              class="el-icon-s-comment"
+            ></i>
+            <span v-else-if="item.scope === 'theme'">
+              <strong style="margin-left: 10px">{{
+                scope.row[item.prop1]
+              }}</strong
+              ><span>{{ scope.row[item.prop2] }}</span>
+            </span>
+            <span v-else-if="item.scope === 'aTimeList'">{{
+              $methodsTools.onlyForma(scope.row[item.prop])
+            }}</span>
+            <span v-else>{{ scope.row[item.prop] }}</span></template
+          ></el-table-column
+        ></template
+      ><el-table-column label="操作" align="center" fixed="right" width="180px">
+        <template slot-scope="scope">
+          <el-button size="mini" @click="newSee(scope.row)" type="text"
+            >立即查看</el-button
+          ><el-button
+            size="mini"
+            :disabled="scope.row.receiptStatus === 1"
+            @click="haveReadID(scope.row.id)"
+            type="text"
+            >标记为已读</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      :total="total"
+      :pageSize="formData.pageSize"
+      :currentPage="formData.pageNum"
+      @handleSizeChange="handleSizeChange"
+      @handleCurrentChange="handleCurrentChange"
+    />
+    <el-dialog
+      :visible.sync="dialogCG"
+      width="760px"
+      :show-close="false"
+      :close-on-click-modal="false"
+    >
+      <div slot="title" class="hearders">
+        <div class="leftTitle">查看消息</div>
+        <div class="rightBoxs">
+          <img
+            src="@/assets/images/Close@2x.png"
+            alt=""
+            @click="dialogCG = false"
+          />
+        </div>
+      </div>
+      <h3 style="color: #333; font-weight: bold">{{ newData.remind }}</h3>
+      <p>{{ newData.text }}</p>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogCG = false">关闭</el-button>
+        <el-button
+          v-if="false"
+          type="primary"
+          @click="
+            submitChecks(
+              newData.type === 2 || newData.type === 3
+                ? 2
+                : newData.type === 4
+                ? 3
+                : 1
+            )
+          "
+          >{{
+            newData.type === 2 || newData.type === 3
+              ? "查看订单"
+              : newData.type === 4
+              ? "查看活动"
+              : "查看学员"
+          }}</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import pagination from "@/components/pagination";
+export default {
+  name: "StationLetter",
+  components: { pagination },
+  data() {
+    return {
+      newData: { remind: "" }, //当前数据
+      options: [
+        {
+          label: "全部",
+          value: "",
+        },
+        {
+          label: "已读",
+          value: 1,
+        },
+        {
+          label: "未读",
+          value: 0,
+        },
+      ],
+      total: 0,
+      dontRead: 0, //未读
+      formData: {
+        pageSize: 10,
+        pageNum: 1,
+        receiptStatus: "",
+        systemStatus: 1,
+      },
+      tableSet: [
+        {
+          label: "状态",
+          prop: "receiptStatus",
+          scope: "icon",
+          width: "80px",
+        },
+        {
+          label: "主题",
+          prop1: "remind",
+          prop2: "text",
+          scope: "theme",
+        },
+        {
+          label: "发送时间",
+          prop: "sendTime",
+          scope: "aTimeList",
+          width: "220px",
+        },
+      ],
+      tableData: [],
+      loading: false,
+      dialogCG: false,
+    };
+  },
+  mounted() {
+    this.search();
+    if (this.$route.params.id) {
+      this.$api.informsys_user(this.$route.params.id).then((res) => {
+        if (res.data) {
+          this.newSee(res.data);
+        }
+      });
+    }
+  },
+  methods: {
+    /**
+     * 查看消息
+     */
+    newSee(data) {
+      this.newData = JSON.parse(JSON.stringify(data));
+      this.dialogCG = true;
+      if (data.receiptStatus !== 1) {
+        this.haveReadID(data.id, false);
+      }
+    },
+    /**
+     * 单个标记已读
+     */
+    haveReadID(id, status = true) {
+      this.$api
+        .editupdateReadStatusBatch({ ids: [id], receiptStatus: 1 })
+        .then((res) => {
+          if (status) {
+            this.$message.success("已读成功");
+            this.$refs.tableData.clearSelection();
+          }
+          this.search();
+        });
+    },
+    /**
+     * 切换消息状态
+     */
+    changeStatus(val) {
+      this.formData.pageSize = 10;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    search() {
+      this.loading = true;
+      this.$api
+        .inquireinformsys_userlist(this.formData)
+        .then((res) => {
+          this.total = res.total;
+          this.tableData = res.rows;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+      this.$api
+        .inquireinformsys_userinformUnReadSum({ systemStatus: 1 })
+        .then((res) => {
+          this.dontRead = res.data;
+        });
+    },
+    /**
+     * 查看学员
+     */
+    submitChecks(int) {
+      this.dialogCG = false;
+      if (int === 3) {
+        const jump = () => {
+          //分销活动列表
+          this.$router.push({
+            name: "ActivityList",
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "ActivityList";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "ActivityList",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 2) {
+        const jump = () => {
+          //退款订单列表
+          this.$router.push({
+            name: "PendingRefundOrder",
+            params: {
+              orderSn: this.newData.orderSn,
+              type:
+                this.newData.type === 3
+                  ? "1,2"
+                  : this.newData.type === 2
+                  ? "0"
+                  : "",
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "PendingRefundOrder";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "PendingRefundOrder",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+      if (int === 1) {
+        const jump = () => {
+          //学员详情
+          this.$router.push({
+            name: "StudentXQ",
+            query: {
+              id: this.newData.studentUserId,
+            },
+          });
+        };
+        const statusPage = this.$store.state.tagsView.visitedViews.some(
+          (item) => {
+            return item.name == "StudentXQ";
+          }
+        );
+        if (statusPage) {
+          this.$store
+            .dispatch("tagsView/delCachedView", {
+              name: "StudentXQ",
+            })
+            .then((res) => {
+              jump();
+            });
+        } else {
+          jump();
+        }
+      }
+    },
+    /**
+     * 已读
+     */
+    haveRead() {
+      const idList = this.$refs.tableData.selection.map((item) => {
+        return item.id;
+      });
+      if (idList.length == 0) {
+        this.$message.warning("请选择需要标记已读的数据");
+        return;
+      }
+      this.$api
+        .editupdateReadStatusBatch({ ids: idList, receiptStatus: 1 })
+        .then((res) => {
+          this.$message.success("已读成功");
+          this.$refs.tableData.clearSelection();
+          this.search();
+        });
+      console.log(idList);
+    },
+    notHaveRead() {
+      const idList = this.$refs.tableData.selection.map((item) => {
+        return item.id;
+      });
+      if (idList.length == 0) {
+        this.$message.warning("请选择需要标记已读的数据");
+        return;
+      }
+      this.$api
+        .editupdateReadStatusBatch({ ids: idList, receiptStatus: 0 })
+        .then((res) => {
+          this.$message.success("未读成功");
+          this.$refs.tableData.clearSelection();
+          this.search();
+        });
+      console.log(idList);
+    },
+    handleSizeChange(v) {
+      this.formData.pageSize = v;
+      this.formData.pageNum = 1;
+      this.search();
+    },
+    handleCurrentChange(v) {
+      this.formData.pageNum = v;
+      this.search();
+    },
+    canSelect(row, index) {
+      if (row.receiptStatus === 0) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.el-button {
+  border-radius: 8px;
+}
+/deep/.el-dialog {
+  border-radius: 8px;
+  .el-dialog__header {
+    padding: 0;
+    .hearders {
+      height: 40px;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      padding: 0px 18px 0px 20px;
+      border-bottom: 1px solid #e2e2e2;
+      .leftTitle {
+        font-size: 14px;
+        font-weight: bold;
+        color: #2f4378;
+      }
+      .rightBoxs {
+        display: flex;
+        align-items: center;
+        img {
+          width: 14px;
+          height: 14px;
+          margin-left: 13px;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .el-dialog__body {
+    max-height: 500px;
+    overflow: auto;
+  }
+  .el-dialog__footer {
+    padding: 0;
+    .dialog-footer {
+      padding: 0px 40px;
+      height: 70px;
+      border-top: 1px solid #e2e2e2;
+      display: flex;
+      align-items: center;
+      justify-content: flex-end;
+    }
+  }
+}
+.imgBox {
+  width: 100%;
+  // height: 210px;
+  border: 1px solid #e2e2e2;
+  border-radius: 8px;
+  padding: 8px 8px 3px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  .imgLabel {
+    flex: 1;
+    width: 100%;
+    border: 1px dotted #e2e2e2;
+    color: #999;
+    font-size: 14px;
+    cursor: pointer;
+    border-radius: 8px;
+    .msPhoto {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      max-width: 100%;
+      max-height: 270px;
+      img {
+        max-width: 100%;
+        max-height: 270px;
+      }
+    }
+    .imgbbx {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      width: 100%;
+      height: 100%;
+      i {
+        font-weight: bold;
+        margin: 14px 0;
+        font-size: 24px;
+      }
+    }
+  }
+  p {
+    margin: 5px 0px;
+  }
+}
+</style>

+ 100 - 34
src/views/integralManagement/giftGoods/dislog.vue

@@ -13,56 +13,86 @@
         ref="formData"
         label-width="100px"
         class="demo-ruleForm"
-      >
-        <el-form-item label="合作商户:" prop="a">
-          <el-input
-            clearable
-            v-model="formData.a"
-            placeholder="输入合作商户"
-          ></el-input> </el-form-item
-        ><el-form-item label="关联使用:" prop="b">
+        ><el-form-item label="关联使用:" prop="useType">
           <el-select
             multiple
             clearable
-            v-model="formData.b"
+            v-model="formData.useType"
             placeholder="请选择关联使用"
           >
             <el-option label="积分商城" :value="1"> </el-option
             ><el-option label="会员卡" :value="2"> </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="合作商户:" prop="merId">
+          <el-select
+            @change="changeMerId"
+            clearable
+            v-model="formData.merId"
+            placeholder="请选择合作商户"
+          >
+            <el-option
+              v-for="(item, index) in merList"
+              :key="index"
+              :label="item.merName"
+              :value="item.merId"
+            >
+            </el-option></el-select></el-form-item
+        ><el-form-item label="商户店铺:" prop="storeId" v-if="formData.merId">
+          <el-select
+            @change="changeStoreId"
+            clearable
+            v-model="formData.storeId"
+            placeholder="请选择商户店铺"
+          >
+            <el-option
+              v-for="(item, index) in computerStore"
+              :key="index"
+              :label="item.storeName"
+              :value="item.storeId"
+            >
+            </el-option>
           </el-select> </el-form-item
-        ><el-form-item label="商品分类:" prop="">
+        ><el-form-item
+          label="商品分类:"
+          prop="categoryIds"
+          v-if="formData.storeId"
+        >
           <el-select
             clearable
-            v-model="formData.classification"
+            v-model="formData.categoryIds"
             placeholder="请选择商品分类"
           >
             <el-option
-              v-for="(item, index) in classificationList"
+              v-for="(item, index) in categoryIdsList"
               :key="index"
               :label="item.label"
               :value="item.value"
             >
             </el-option>
           </el-select> </el-form-item
-        ><el-form-item label="商品名称:" prop="c">
+        ><el-form-item label="商品名称:" prop="goodsName">
           <el-input
             clearable
-            v-model="formData.c"
+            v-model="formData.goodsName"
             placeholder="输入商品名称"
           ></el-input> </el-form-item
-        ><el-form-item label="商品主图:" prop="urls">
+        ><el-form-item label="商品主图:" prop="mainImg">
           <ul class="imgList">
             <li
               class="imgLi"
-              v-for="(item, index) in formData.urls"
+              v-for="(item, index) in formData.mainImg"
               :key="index"
             >
-              <i class="el-icon-error del" @click="formData.urls.splice(index,1)"></i>
+              <i
+                class="el-icon-error del"
+                @click="formData.mainImg.splice(index, 1)"
+              ></i>
               <el-image
                 style="width: 90px; height: 90px"
                 :src="$methodsTools.splitImgHost(item)"
                 :preview-src-list="
-                  formData.urls.map((i) => $methodsTools.splitImgHost(i))
+                  formData.mainImg.map((i) => $methodsTools.splitImgHost(i))
                 "
                 :initial-index="index"
               >
@@ -79,33 +109,54 @@
           <p style="color: #a4a4a4; margin: 0">
             建议尺寸:800*800像素;大小200K以下
           </p></el-form-item
-        ><el-form-item label="兑换积分:" prop="e">
-          <el-input-number
-            :controls="false"
-            v-model="formData.e"
-            placeholder="输入兑换积分"
-            :min="0"
-            :precision="0" /></el-form-item
-        ><el-form-item label="商品原价:" prop="f">
+        ><el-form-item label="商品原价:" prop="standPrice">
           <el-input-number
             :controls="false"
-            v-model="formData.f"
+            v-model="formData.standPrice"
             placeholder="输入商品原价"
             :min="0"
             :precision="2"
           /> </el-form-item
-        ><el-form-item label="会员优惠价:" prop="g">
+        ><el-form-item label="会员优惠价:" prop="specialPrice">
           <el-input-number
             :controls="false"
-            v-model="formData.g"
+            v-model="formData.specialPrice"
             placeholder="输入会员优惠价"
             :min="0"
             :precision="2"
-          />
-        </el-form-item>
+          /> </el-form-item
+        ><el-form-item label="可抵扣积分:" prop="e">
+          <el-input-number
+            :controls="false"
+            v-model="formData.e"
+            placeholder="输入可抵扣积分"
+            :min="0"
+            :precision="0"
+        /></el-form-item>
         <el-form-item label="商品详情:">
+          <div style="margin-bottom: 14px">
+            <el-button
+              size="small"
+              @click="mobileDetailStatus = 1"
+              :type="mobileDetailStatus === 1 ? 'primary' : ''"
+              >手机端</el-button
+            >
+            <el-button
+              size="small"
+              @click="mobileDetailStatus = 2"
+              :type="mobileDetailStatus === 2 ? 'primary' : ''"
+              >电脑端</el-button
+            >
+          </div>
           <editor
-            v-model="formData.html"
+            v-show="mobileDetailStatus === 1"
+            v-model="formData.mobileDetailHtml"
+            :min-height="300"
+            :max-height="500"
+            :uploadStatus="2"
+          /><editor
+            v-show="mobileDetailStatus === 2"
+            v-model="formData.pcDetailHtml"
             :min-height="300"
             :max-height="500"
             :uploadStatus="2"
@@ -117,6 +168,7 @@
 </template>
 
 <script>
+import { mapGetters } from "vuex";
 import Editor from "@/components/Editor";
 export default {
   components: { Editor },
@@ -135,7 +187,7 @@ export default {
   },
   data() {
     return {
-      classificationList: [
+      categoryIdsList: [
         {
           label: "技术类",
           value: 1,
@@ -145,10 +197,13 @@ export default {
           value: 2,
         },
       ],
+      computerStore: [],
       formData: {
         accountList: [{}],
         invoiceBo: {},
+        storeId: null,
       },
+      mobileDetailStatus: 1,
       rules: {
         tenantName: [
           { required: true, message: "请输入机构名称", trigger: "blur" },
@@ -160,6 +215,16 @@ export default {
     };
   },
   methods: {
+    changeMerId(e) {
+      if (e) {
+        this.computerStore = this.storeList.filter((i) => i.merId === e) || [];
+      } else {
+        this.computerStore = [];
+      }
+      this.$set(this.formData, "storeId", null);
+    },
+    changeStoreId(e) {
+    },
     uploadImg(e) {
       var self = this;
       var file = e.target.files[0];
@@ -200,6 +265,7 @@ export default {
     },
   },
   computed: {
+    ...mapGetters(["merList", "storeList"]),
     isShow: {
       get() {
         if (this.dialogVisible) {
@@ -264,7 +330,7 @@ export default {
   width: 220px;
   margin-right: 10px;
 }
-.del{
+.del {
   color: red;
   position: absolute;
   top: 0;

+ 198 - 0
src/views/integralManagement/goodsClassification/dislog.vue

@@ -0,0 +1,198 @@
+<template>
+  <div>
+    <BaseDialog
+      width="580px"
+      :isShow.sync="isShow"
+      :title="formData.categoryId ? '编辑分类' : '添加分类'"
+      @submit="submitForm"
+      @close="close"
+    >
+      <el-form
+        :model="formData"
+        :rules="rules"
+        ref="formData"
+        label-width="100px"
+        class="demo-ruleForm"
+      >
+        <el-form-item label="合作商户:" prop="merId">
+          <el-select
+            @change="changeMerId"
+            clearable
+            v-model="formData.merId"
+            placeholder="请选择合作商户"
+          >
+            <el-option
+              v-for="(item, index) in merList"
+              :key="index"
+              :label="item.merName"
+              :value="item.merId"
+            >
+            </el-option></el-select></el-form-item
+        ><el-form-item label="商户店铺:" prop="storeId" v-if="formData.merId">
+          <el-select
+            @change="changeStoreId"
+            clearable
+            v-model="formData.storeId"
+            placeholder="请选择商户店铺"
+          >
+            <el-option
+              v-for="(item, index) in computerStore"
+              :key="index"
+              :label="item.storeName"
+              :value="item.storeId"
+            >
+            </el-option>
+          </el-select> </el-form-item
+        ><el-form-item
+          label="上级分类:"
+          prop="parentId"
+          v-if="formData.storeId"
+        >
+          <el-cascader
+            clearable
+            placeholder="请选择上级分类"
+            v-model="formData.parentId"
+            :options="computerTree"
+            :show-all-levels="false"
+            :props="{
+              label: 'categoryName',
+              value: 'categoryId',
+              checkStrictly: true,
+            }"
+          ></el-cascader> </el-form-item
+        ><el-form-item label="商品分类:" prop="categoryName">
+          <el-input
+            placeholder="请输入商品分类"
+            v-model="formData.categoryName"
+          />
+        </el-form-item>
+      </el-form>
+      <template slot="slotBtn">
+        <el-button type="success" @click="submitForm(true)">启用</el-button>
+      </template>
+    </BaseDialog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+export default {
+  name: "",
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false,
+    },
+    treeData: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      formData: {
+        merId: "",
+        storeId: "",
+        parentId: "",
+        categoryName: "",
+      },
+      rules: {
+        merId: [
+          { required: true, message: "请选择合作商户", trigger: "change" },
+        ],
+        storeId: [
+          { required: true, message: "请选择商户店铺", trigger: "change" },
+        ],
+        parentId: [
+          { required: true, message: "请选择上级分类", trigger: "change" },
+        ],
+        categoryName: [
+          { required: true, message: "请输入商品分类", trigger: "blur" },
+        ],
+      },
+      computerStore: [],
+      computerTree: [],
+    };
+  },
+
+  methods: {
+    changeMerId(e) {
+      if (e) {
+        this.computerStore = this.storeList.filter((i) => i.merId === e) || [];
+      } else {
+        this.computerStore = [];
+      }
+      this.$set(this.formData, "storeId", null);
+    },
+    changeStoreId(e) {
+      this.computerTree = [
+        {
+          categoryId: 0,
+          categoryName: "---无---",
+        },
+      ];
+      if (e) {
+        this.$api.mallgoodscategorytree({ storeId: e }).then((res) => {
+          if (res.data?.length > 0) {
+            this.computerTree.push(...res.data);
+          }
+        });
+      }
+      this.$set(this.formData, "parentId", null);
+    },
+    init() {
+      this.formData = JSON.parse(JSON.stringify(this.treeData));
+    },
+    close() {
+      this.$refs["formData"].resetFields();
+    },
+    submitForm(status) {
+      this.$refs["formData"].validate((valid) => {
+        if (valid) {
+          this.$api[
+            this.formData.categoryId
+              ? "editmallgoodscategorysave"
+              : "addmallgoodscategorysave"
+          ]({
+            status: status ? 1 : 0,
+            ...this.formData,
+          }).then((res) => {
+            this.$message.success("成功");
+            this.isShow = false;
+            this.$emit("search");
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+  },
+  computed: {
+    ...mapGetters(["merList", "storeList"]),
+    isShow: {
+      get() {
+        if (this.dialogVisible) {
+          this.init();
+        }
+        return this.dialogVisible;
+      },
+      set(val) {
+        this.$emit("update:dialogVisible", false);
+      },
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.el-input {
+  width: 220px;
+  margin-right: 10px;
+}
+.el-select {
+  width: 220px;
+  margin-right: 10px;
+}
+</style>

+ 223 - 0
src/views/integralManagement/goodsClassification/index.vue

@@ -0,0 +1,223 @@
+<template>
+  <div id="">
+    <search-box-new
+      ref="searchBox"
+      :formData="formData"
+      :formList="formList"
+      @search="search"
+      @init="init"
+    />
+    <table-list
+      rowKey="categoryId"
+      ref="tableList"
+      :tableSets="tableSet"
+      :tableData="tableData"
+      :navText="navText"
+      :loading="loading"
+      @addClick="addClick"
+    >
+      <template slot="customize">
+        <el-button type="warning" @click="remove"> 批量删除 </el-button>
+      </template>
+      <template slot="status" slot-scope="props">
+        <el-switch
+          v-model="props.scope.row.status"
+          active-color="#13ce66"
+          inactive-color="#ff4949"
+          :active-value="1"
+          :inactive-value="0"
+          @change="statusChange($event, props.scope.row)"
+        >
+        </el-switch>
+      </template>
+      <template slot="btn" slot-scope="props">
+        <el-button type="text" @click="addClick(props.scope.row)"
+          >编辑</el-button
+        ><el-button type="text" @click="addClick(props.scope.row)"
+          >添加</el-button
+        ><el-button type="text" @click="del(props.scope.row)">删除</el-button>
+      </template>
+    </table-list>
+    <pagination
+      :total="total"
+      :pageSize.sync="formData.pageSize"
+      :currentPage.sync="formData.pageNum"
+      @search="search"
+    />
+    <dislog
+      :dialogVisible.sync="dialogVisible"
+      @search="search"
+      :categoryId="categoryId"
+    ></dislog>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import dislog from "./dislog.vue";
+import searchBoxNew from "@/components/searchBoxNew";
+import tableList from "@/components/tableList";
+import pagination from "@/components/pagination";
+export default {
+  name: "GoodsClassification",
+  components: { searchBoxNew, tableList, pagination, dislog },
+  data() {
+    return {
+      loading: false,
+      navText: {
+        title: "商品分类",
+        index: 0,
+        ch: "条",
+        num: true,
+        choice: true,
+        addHide: false,
+        custom: false,
+        openCheckMore: true,
+      },
+      formList: [
+        {
+          prop: "merId",
+          placeholder: "请选择合作商户",
+          scope: "merList",
+        },
+        {
+          prop: "storeId",
+          placeholder: "请选择商户店铺",
+          scope: "storeList",
+        },
+        {
+          prop: "storeName",
+          placeholder: "输入分类名称",
+        },
+      ],
+      formData: {},
+      tableSet: [
+        {
+          label: "分类名称",
+          prop: "categoryName",
+          hidden: true,
+        },
+        {
+          label: "合作商户",
+          prop: "merName",
+          hidden: true,
+        },
+        {
+          label: "商户店铺",
+          prop: "storeName",
+          hidden: true,
+        },
+        {
+          label: "启用状态",
+          prop: "status",
+          hidden: true,
+          scope: "solt",
+          soltName: "status",
+        },
+        {
+          label: "创建时间",
+          prop: "createTime",
+          hidden: true,
+          scope: "aTimeList",
+        },
+      ],
+      tableData: [],
+      total: 0,
+      dialogVisible: false,
+      categoryId: 0,
+    };
+  },
+  created() {
+    this.search(2);
+  },
+  methods: {
+    remove() {
+      if (this.$refs.tableList.allCheckData.length === 0) {
+        this.$message.error("请勾选数据");
+        return;
+      }
+      this.$confirm("确定批量删除选中的数据吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .mallgoodscategorybatchdel({
+              categoryIds: this.$refs.tableList.allCheckData.map((i) => i.categoryId),
+              status: -1,
+            })
+            .then(() => {
+              this.$message.success("批量删除成功");
+              this.search(3);
+            });
+        })
+        .catch(() => {});
+    },
+    addClick(data) {
+      this.categoryId = data?.categoryId || 0;
+      this.dialogVisible = true;
+    },
+    search(v) {
+      this.loading = true;
+      if (v === 2) {
+        this.formData = {
+          pageSize: 10,
+          pageNum: 1,
+          status: "0,1",
+        };
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
+      }
+      if (v === 3) {
+        this.$nextTick(() => {
+          this.$refs.tableList.clearMoreActive();
+        });
+      }
+      this.$api
+        .mallgoodscategorylist(this.formData)
+        .then((res) => {
+          this.tableData = res.rows;
+          this.total = res.total;
+          this.navText.index = res.total;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    statusChange(e, row) {
+      this.$api
+        .editmallgoodscategorysave({ categoryId: row.categoryId, status: e })
+        .then((res) => {
+          this.$message.success("操作成功");
+          row.status = e;
+        })
+        .catch(() => {
+          return (row.status = e ? 0 : 1);
+        });
+    },
+    init() {
+      this.search(2);
+    },
+    del(v) {
+      this.$confirm("确定删除此内容?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          this.$api
+            .editmallgoodscategorysave({ categoryId: row.categoryId, status: -1 })
+            .then((res) => {
+              this.$message.success("删除成功");
+              this.search();
+            });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 1 - 1
src/views/integralManagement/storeManageMent/dislog.vue

@@ -99,7 +99,6 @@ export default {
           address: "",
         };
       }
-      console.log(this.merList, "---merList");
     },
     close() {
       this.$refs["formData"].resetFields();
@@ -112,6 +111,7 @@ export default {
             ...this.formData,
           }).then((res) => {
             this.$message.success("成功");
+            this.$store.commit("STORELIST");
             this.isShow = false;
             this.$emit("search");
           });

+ 3 - 0
src/views/integralManagement/storeManageMent/index.vue

@@ -141,6 +141,7 @@ export default {
             })
             .then(() => {
               this.$message.success("批量删除成功");
+              this.$store.commit("STORELIST");
               this.search(3);
             });
         })
@@ -183,6 +184,7 @@ export default {
         .editmallstore({ storeId: row.storeId, merId: row.merId, status: e })
         .then((res) => {
           this.$message.success("操作成功");
+              this.$store.commit("STORELIST");
           row.status = e;
         })
         .catch(() => {
@@ -203,6 +205,7 @@ export default {
             .editmallmerchant({ storeId: row.storeId, status: -1 })
             .then((res) => {
               this.$message.success("删除成功");
+              this.$store.commit("STORELIST");
               this.search();
             });
         })

+ 0 - 1
src/views/systemSettings/menu/index.vue

@@ -397,7 +397,6 @@ export default {
       if (row.menuType == "F") {
         return "";
       }
-      console.log("this.statusOptions, row.status",this.statusOptions, row.status)
       return this.selectDictLabel(this.statusOptions, row.status);
     },
     // 取消按钮