MONSTER-ygh il y a 8 mois
Parent
commit
da9540f75a

+ 10 - 1
src/api/CURD.js

@@ -52,7 +52,16 @@ export function getTableDeatilsByIdApi(url,params) {
     })
   }
 
-  // 删除table
+   // 删除table
+   export function delTableDataApi(url,params) {
+    return request({
+      url: url,
+      method: 'delete',
+      data: params
+    })
+  }
+
+  // 删除table params
   export function delTableParamsApi(url,params) {
     return request({
       url: url,

+ 1 - 1
src/views/tourism/commodityManagement/commodityClass.vue

@@ -146,7 +146,7 @@
         listTableApi(
           this.configUrl.list,
           this.addDateRange(
-            this.queryParams,
+            {...this.queryParams,classifyType: 3},
             this.dateRange)).then(response => {
               let list = response.data
               this.tableList = list;

+ 21 - 5
src/views/tourism/commodityManagement/commodityList.vue

@@ -92,9 +92,16 @@
               label="操作"
               align="center"
               class-name="small-padding fixed-width"
-              width="180px"
+              width="220px"
             >
               <template slot-scope="scope" >
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-menu"
+                  @click="handleQRcode(scope.row)"
+                  v-hasPermi="configPermi.qrCode"
+                >二维码</el-button>
                 <el-button
                   size="mini"
                   type="text"
@@ -133,6 +140,7 @@
       <addAndEdit ref="addAndEdit" :listTreeCopy="listTreeCopy" @refresh="getList" />
       <!--  详情   -->
       <detailsBox ref="detailsBox" @refresh="getList"></detailsBox>
+      <qrCode ref="qrCode" />
     </div>
   </template>
 
@@ -147,10 +155,11 @@
   import detailsBox from "./detailsBox/commodityListDetails.vue"
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+  import qrCode from "./detailsBox/qrCode.vue"
   export default {
     name: "User",
     dicts: [],
-    components: {addAndEdit,Treeselect,detailsBox},
+    components: {addAndEdit,Treeselect,detailsBox,qrCode},
     data() {
       return {
         title: "商品管理",// 通用标题
@@ -161,7 +170,8 @@
           edit: ['commodityManagement:commodityList:edit'], // 编辑基本信息权限
           upload: [''],// 导入权限
           export: [''],// 导出权限
-          release: ['']
+          release: [''],
+          qrCode: ['commodityManagement:commodityList:qrCode'], // 新增权限
         },
         configUrl: {
           list: '/merchant/merchantPerformAuditorium/shopGoodsList', // 列表地址
@@ -223,7 +233,8 @@
       getList() {
         this.loading = true;
         let params = JSON.parse(JSON.stringify(this.queryParams))
-        params['shopType'] = 4
+        params['shopType'] = 3
+        params['goodsType'] = 3
         listTableApi(
           this.configUrl.list,
           this.addDateRange(
@@ -332,7 +343,7 @@
       },
       /**  远程搜索商品分类  */
       remoteClassifyId() {
-        listTableApi(this.configUrl.classifyList).then(response => {
+        listTableApi(this.configUrl.classifyList,{classifyType: 3}).then(response => {
               let list = response.data
               this.listTreeCopy = list
           }
@@ -358,6 +369,11 @@
         }
         
       },
+      handleQRcode(row) {
+        if(this.$refs.qrCode) {
+          this.$refs.qrCode.initData('小程序页面二维码',"DEATILSInit", row)
+        }
+      }
     }
   };
   </script>

+ 227 - 0
src/views/tourism/commodityManagement/detailsBox/qrCode.vue

@@ -0,0 +1,227 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="300px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div style="width: 100%;height: 100%;display: flex;justify-content: center;">
+        <img width="200px" height="200px" :src="qrCodeImage" alt="暂无图片">
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="qrCodeImage">
+      <el-button type="text" @click="downloadIamge(qrCodeImage,'小程序二维码'+new Date().getTime())">
+        <i class="el-icon-download"></i>
+        下载
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: "QRCodeDetails",
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      qrCodeImage: '',// 二维码
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.model = model
+      this.qrCodeImage = row.appletQrcode
+      this.formStatus = 1
+      this.loading = false
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    downloadIamge(src, imgName){
+      let image = new Image()
+      image.src = src
+      image.setAttribute("crossOrigin", "anonymous")
+      image.onload = function() {
+          let c = document.createElement("canvas")
+          c.width = image.width
+          c.height = image.height
+          c.getContext("2d").drawImage(image, 0, 0, image.width, image.height)
+          let a = document.createElement("a")
+          a.download = imgName
+          a.href = c.toDataURL("image/png")
+          a.click()
+      }
+    }
+  },
+  watch: {}
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  height: 200px;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 3 - 1
src/views/tourism/commodityManagement/formBox/commodityClassForm.vue

@@ -122,7 +122,7 @@ export default {
     },
       /** 查询用户列表 */
       getList() {
-        listTableApi(this.configUrl.list).then(response => {
+        listTableApi(this.configUrl.list,{classifyType: 3}).then(response => {
               let list = response.data
               this.listTreeCopy = [
                 {
@@ -180,6 +180,7 @@ export default {
             addTableApi(
               this.configUrl.edit,{
                 ...this.form,
+                classifyType: 3,
                 parentsId: this.form.parentsId == '-9999' ? '':this.form.parentsId
               }).then(response => {
               this.$modal.msgSuccess("修改成功");
@@ -193,6 +194,7 @@ export default {
           } else {
             addTableApi(this.configUrl.edit,{
                 ...this.form,
+                classifyType: 3,
                 parentsId: this.form.parentsId == '-9999' ? '':this.form.parentsId
               }).then(response => {
               this.$modal.msgSuccess("新增成功");

+ 4 - 2
src/views/tourism/commodityManagement/formBox/shopManagementForm.vue

@@ -201,7 +201,8 @@ export default {
           if (this.model != 'ADD') {
             addTableApi(
               this.configUrl.edit,{
-                ...this.form
+                ...this.form,
+                shopType: 3
               }).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.loading = false
@@ -213,7 +214,8 @@ export default {
             })
           } else {
             addTableApi(this.configUrl.edit,{
-                ...this.form
+                ...this.form,
+                shopType: 3
               }).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.loading = false

+ 3 - 1
src/views/tourism/commodityManagement/shopManagement.vue

@@ -170,10 +170,12 @@
       /** 查询用户列表 */
       getList() {
         this.loading = true;
+        let params = JSON.parse(JSON.stringify(this.queryParams))
+        params['shopType'] = 3
         listTableApi(
           this.configUrl.list,
           this.addDateRange(
-            this.queryParams,
+            params,
             this.dateRange)).then(response => {
               this.tableList = response.data.rows;
               this.total = response.data.total;

+ 368 - 0
src/views/tourism/membershipManagement/equityCard/detailsBox/equityCardAllocationDetails.vue

@@ -0,0 +1,368 @@
+<template>
+  <el-dialog 
+  :title="title" 
+  :visible.sync="open" 
+  width="70%" 
+  append-to-body 
+  :close-on-click-modal="false"
+    @close="cancel">
+    <div class="form-dialog-box" v-loading="loading" :element-loading-text="loadingText"
+      element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0)">
+      <div v-loading="loading" :element-loading-text="''" element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)">
+        <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+          <div class="form-title"><span>基本信息</span></div>
+          <el-form-item label="实体卡名称:" prop="name">
+            <span style="display: block; min-width: 250px;">{{ form.name }}</span>
+          </el-form-item>
+          <el-form-item label="实体卡价格:" prop="salePrice">
+            <span style="display: block; min-width: 250px;">{{ form.salePrice }}<span>元</span></span>
+          </el-form-item>
+          <div class="form-title"><span>使用规则</span></div>
+          <el-form-item label="使用期限:" prop="validityDayS">
+            <el-radio-group v-model="form.validityDayS" @input="radioInputs">
+              <div style="display: flex;flex-direction: column;">
+                <div v-if="form.validityDayS == -1">
+                  <el-radio :label="-1">永久生效</el-radio>
+                </div>
+                <div v-if="form.validityDayS == 2" style="display: flex;align-items: center;">
+                  <el-radio style="display: flex;align-items: center;" :label="2">
+                    <div style="display: flex;align-items: center;">
+                      <el-form-item label="" label-width="0" :prop="'validityDay'">
+                        <span>指定</span>
+                        <span>{{ form.validityDay }}</span>
+                        <span>天有效</span>
+                      </el-form-item>
+                    </div>
+                  </el-radio>
+                </div>
+              </div>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="生效日期:" prop="validityType">
+            <el-radio-group v-model="form.validityType">
+              <el-radio v-if="form.validityType == 0" :label="0">按激活日期生效</el-radio>
+              <el-radio v-if="form.validityType == 1" :label="1">按购买日期生效</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <!-- <div class="form-title"><span>激活规则</span></div>
+          <el-form-item label="激活后完善信息:" prop="activateType">
+            <el-checkbox-group v-model="form.activateType">
+              <el-checkbox 
+              v-for="dict in dict.type.activation_rule"
+              :key="dict.value"
+              :label="dict.value">{{dict.label}}</el-checkbox>
+            </el-checkbox-group>
+          </el-form-item> -->
+          <div class="form-title"><span>权益规则</span></div>
+          <el-form-item label="门票折扣权益:">
+            <div style="display: flex;align-items: center;">
+              <el-form-item label="基本折扣:" prop="benefitList" label-width="100px">
+                <span>{{ form.benefitList }}</span>
+                <span style="padding-bottom: 15px;">%</span>
+              </el-form-item>
+            </div>
+          </el-form-item>
+          <el-form-item label="持卡须知:" prop="remark">
+            <span>{{ form.remark }}</span>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus == 1">
+      <el-button @click="cancel" :loading="loading">关闭</el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import {
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi
+} from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: ['activation_rule'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/merchant/equityCard', // 新增地址
+        details: '/merchant/equityCard/detail', // 规格详情
+        edit: '/merchant/equityCard', // 编辑地址
+      },
+      performId: null,
+      form: {
+        id: undefined,
+        activateType: []
+      },
+      rules: {},
+      tableList: [],// 景点产品关联
+      scenicAreaProducts: [],
+    };
+  },
+  methods: {
+    async initData(title, model, row) {
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',row)
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='DEATILSInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details, { id })
+        if (res.code == 200) {
+          let obj = {
+            ...res.data,
+            activateType: res.data.activateType?res.data.activateType.split('|'):[]
+          }
+          if(res.data.benefitList && res.data.benefitList.length>0) {
+            obj['benefitList'] = res.data.benefitList[0].benefitValue
+          }
+          this.$set(this, 'form', JSON.parse(JSON.stringify(obj)))
+          this.radioInputs(obj.validityDay)
+          this.formStatus = 1
+        } else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          //this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!', error)
+        this.formStatus = 2
+        this.loading = false
+        //this.open = false;
+      }
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if (this.$refs["form"]) {
+        //this.$refs["form"].resetFields();
+        this.$set(this, 'form', {activateType:[]})
+        this.$nextTick(() => {
+          this.$refs["form"].clearValidate();
+        })
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+     /** */
+     radioInputs(value) {
+      if (value == -1) {
+        this.$set(this.form,'validityDayS',-1)
+        this.rules.validityDay[0].required = false
+        this.$refs.form.clearValidate('validityDay');
+      } else {
+        this.$set(this.form,'validityDayS',2)
+        this.rules.validityDay[0].required = true
+        this.$refs.form.clearValidate('validityDay');
+      } 
+    }, 
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+
+  .form-title {
+    padding: 0 0 10px 0;
+
+    span {
+      display: flex;
+      color: rgba(65, 80, 88, 1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+
+  }
+
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+
+    &-text {
+      margin-top: -10px;
+    }
+  }
+
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.el-table {
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+
+    &-text {
+      margin-top: -10px;
+    }
+  }
+
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+
+    .el-input__inner {
+      display: none !important;
+    }
+
+    span.el-input__suffix {
+      position: inherit !important;
+
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+::v-deep .avatar-uploader .el-upload:hover {
+  border-color: #409EFF;
+}
+
+::v-deep .avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+
+::v-deep .avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 350 - 0
src/views/tourism/membershipManagement/equityCard/detailsBox/equityCardManagementDetails.vue

@@ -0,0 +1,350 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="50%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div
+        v-loading="loading"
+        :element-loading-text="''"
+        element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+        <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+          <div class="form-title"><span>基本信息</span></div>
+          <el-form-item label="权益卡号:" prop="cardNo">
+            <span>{{ form.cardNo }}</span>
+          </el-form-item>
+          <el-form-item label="办卡类型:" prop="equitycardName">
+            <span>{{ form.equitycardName }}</span>
+          </el-form-item>
+          <el-form-item label="持卡人:" prop="name">
+            <span>{{ form.name }}</span>
+          </el-form-item>
+          <el-form-item label="身份证号:" prop="idcard">
+            <span>{{ form.idcard }}</span>
+          </el-form-item>
+          <el-form-item label="手机号:" prop="mobile">
+            <span>{{ form.mobile }}</span>
+          </el-form-item>
+          <el-form-item label="卡状态:" prop="actStatus">
+            <dict-tag :options="dict.type.activate_status" :value="form.actStatus"/>
+          </el-form-item>
+          <div class="form-title"><span>验证信息</span></div>
+          <el-form-item label="人脸图片:" prop="ocrPic">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.ocrPic" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.ocrPic">
+                </el-image>
+              </div>  
+            </div>
+          </el-form-item>
+          <div class="form-title" v-if="form.actStatus != 0"><span>审核信息</span></div>
+          <el-form-item v-if="form.errReason_1" label="审核备注:" label-width="100px">{{ form.errReason_1 }}</el-form-item>
+          <div v-if="model=='DEATILSADD'">
+            <div class="form-title" style="display: flex;align-items: flex-end;"><span>审核操作</span><i>(注意:驳回时需填写驳回原因)</i></div>
+              <div>
+                <el-form-item label="审核备注:" :error="errReasonText" label-width="100px"></el-form-item>
+                <div>
+                  <el-input
+                    type="textarea"
+                    :rows="2"
+                    placeholder="请输入审核备注"
+                    v-model="form.errReason">
+                  </el-input>
+                </div>
+              </div>
+              <div style="display: flex;margin-top: 10px;justify-content: center;">
+                <el-button 
+                type="danger" 
+                @click="refundAudit(2)"
+                :loading="loading"
+                >驳回</el-button>
+                <el-button type="primary" :loading="loading" @click="refundAudit(1)">同意</el-button>
+              </div>
+          </div>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus==1">
+      <el-button @click="cancel">关闭</el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  getTableDeatilsByIdApi,
+  addTableApi
+ } from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: ['activate_status'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '', // 新增地址
+        details: '/merchant/memberEquityCard/detail', // 详情地址
+        edit: '', // 编辑地址     
+      },
+      form: {
+        id: undefined,
+        ocrPic: []
+      },
+      rules: {},
+      scenicAreaProducts: [],// 景点产品关联
+      errReasonText: ''
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      if(model=='EDITInit' || model == 'DEATILSADD') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id})
+        if(res.code == 200) {
+          let obj = {
+            ...res.data,
+            ocrPic: res.data.ocrPic?res.data.ocrPic.split(','):[],
+            errReason_1: res.data.errReason
+        }
+        this.errReasonText = ''
+          this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
+          this.formStatus = 1
+        }else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!',error)
+        this.formStatus = 2
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    /**  审核操作  */
+    refundAudit(type){
+      if(type == 2 && !this.form.errReason) {
+        this.errReasonText = "请输入驳回原因"
+        return
+      } 
+      this.loading = true
+      addTableApi(
+        type == 2?'/merchant/memberEquityCard/authReject':'/merchant/memberEquityCard/authPass',{
+          id: this.form.id,// 退款ID-列表ID
+          errReason: this.form.errReason,
+        }).then(response => {
+          this.$modal.msgSuccess(`提交成功`);
+          this.loading = false
+          this.open = false;
+          this.$emit('refresh')
+        }).catch(()=>{
+          this.$message.error("提交失败!!!");
+          this.loading = false
+        })
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 317 - 0
src/views/tourism/membershipManagement/equityCard/equityCardCinfig.vue

@@ -0,0 +1,317 @@
+<template>
+    <div class="app-container">
+      <el-row :gutter="20">
+        <!--用户数据-->
+        <el-col :span="24" :xs="24">
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
+                <el-form-item label="权益卡名称" prop="name">
+                    <el-input
+                    v-model="queryParams.name"
+                    placeholder="请输入权益卡名称"
+                    clearable
+                    style="width: 240px"
+                    @keyup.enter.native="handleQuery"
+                    />
+                </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-row :gutter="10" class="mb8">
+            <el-col :span="1.5">
+              <el-button
+                type="primary"
+                plain
+                icon="el-icon-plus"
+                size="mini"
+                @click="handleAdd"
+                v-hasPermi="configPermi.add"
+              >添加新卡</el-button>
+            </el-col>
+            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+          </el-row>
+  
+          <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
+            <el-table-column type="index" label="序号" align="center"  />
+            <el-table-column label="权益卡名称" align="center" key="name" prop="name" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="权益卡价格(元)" align="center" key="salePrice" prop="salePrice" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="使用期限" align="center" key="validityDay" prop="validityDay" v-if="columns[2].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                  <span>{{ setUseType(scope.row) }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="生效日期" align="center" key="validityType" prop="validityType" v-if="columns[3].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                  <span>{{ setEffectiveDateType(scope.row) }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="创捷时间" align="center" key="createTime" prop="createTime" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+            <el-table-column
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+            >
+              <template slot-scope="scope" >
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleDetails(scope.row)"
+                  v-hasPermi="configPermi.details"
+                >详情</el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate(scope.row)"
+                  v-hasPermi="configPermi.edit"
+                >编辑</el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                  v-hasPermi="configPermi.delect"
+                >删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+  
+          <pagination
+            v-show="total>0"
+            :total="total"
+            :page.sync="queryParams.pageNum"
+            :limit.sync="queryParams.pageSize"
+            @pagination="getList"
+          />
+        </el-col>
+      </el-row>
+      <!--  新增或修改  -->
+      <addAndEdit ref="addAndEdit" @refresh="getList" />
+      <detailsBox ref="detailsBox" @refresh="getList" ></detailsBox>
+    </div>
+  </template>
+  
+  <script>
+  import { 
+    listTableApi, 
+    delTableDataApi
+    } from "@/api/CURD";
+  import addAndEdit from "./formBox/equityCardAllocationForm.vue"
+  import detailsBox from "./detailsBox/equityCardAllocationDetails.vue"
+  export default {
+    name: "User",
+    dicts: [],
+    components: {addAndEdit,detailsBox},
+    data() {
+      return {
+        title: "权益卡配置",// 通用标题
+        configPermi: {
+          add: ['equityCard:equityCardAllocation:add'], // 新增权限
+          details: ['equityCard:equityCardAllocation:details'], // 详情权限
+          delect: ['equityCard:equityCardAllocation:delect'], // 删除权限
+          edit: ['equityCard:equityCardAllocation:edit'], // 编辑权限
+          upload: [''],// 导入权限
+          export: [''],// 导出权限
+          release: ['']
+        },
+        configUrl: {
+          list: '/merchant/equityCard', // 列表地址
+          delect: '/merchant/equityCard', // 删除地址
+          upload: '',// 导入地址
+          download:'', // 下载模板地址
+          export: '',// 导出地址
+          updateStatusById: '',
+        },
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 用户表格数据
+        tableList: null,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+        },
+        dateRange: [],
+        // 控制列表是否显示
+        columns: [
+          { key: 0, label: `权益卡名称`, visible: true },
+          { key: 2, label: `权益卡价格`, visible: true },
+          { key: 3, label: `使用期限`, visible: true },
+          { key: 4, label: `生效日期`, visible: true },
+          { key: 7, label: `创捷时间`, visible: true },
+        ],
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      /** 查询用户列表 */
+      getList() {
+        this.loading = true;
+        listTableApi(
+          this.configUrl.list,
+          this.addDateRange(
+            this.queryParams, 
+            this.dateRange)).then(response => {
+              this.tableList = response.rows;
+              this.total = response.total;
+              this.loading = false;
+          }
+        ).catch (error=>{
+          console.error('获取列表失败!!!!',error)
+          this.tableList = [];
+          this.total = 0;
+          this.loading = false
+        }) 
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10,
+        }
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id);
+        this.single = selection.length != 1;
+        this.multiple = !selection.length;
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        if(this.$refs.addAndEdit) {
+          this.$refs.addAndEdit.initData(this.title + '新增', "ADD",{})
+        }
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        if(this.$refs.addAndEdit) {
+          this.$refs.addAndEdit.initData(this.title + '基本信息编辑', "EDITInit",{...row})
+        }
+      },
+      handleUpdate(row) {
+        if(this.$refs.addAndEdit) {
+          this.$refs.addAndEdit.initData(this.title + '规格信息编辑', "EDITInit",{...row})
+        }
+      },
+      handleDetails(row){
+        if(this.$refs.detailsBox) {
+          this.$refs.detailsBox.initData(this.title + '详情',"DEATILSInit", row)
+        }
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = row.id || this.ids;
+        this.$modal.confirm('是否确认删除数据项?').then( () => {
+          return delTableDataApi(this.configUrl.delect,{
+            id: ids
+          });
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch((e) => {
+          console.error("删除失败====",e)
+        });
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        this.download(this.configUrl.export, {
+          ...this.queryParams
+        }, `${this.title }_${new Date().getTime()}.xlsx`)
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        if(this.$refs.upload) {
+          this.$refs.upload.initData({
+            width: '400px',
+            // 弹出层标题(用户导入)
+            title: this.title + "导入",
+            // 下载模板地址
+            importTemplate: this.configUrl.download,
+            // 上传的地址
+            url: this.configUrl.upload
+          })
+        }
+      },
+      /**
+       * 修改状态
+       * @date 2023-11-22
+       * @returns {any}
+       */
+      openAttraction(row) {
+        this.$modal.confirm(`是否确认${row.status == 1 ? '上架' : '下架'} ${row.name}点位吗?`).then( () => {
+          return listTableApi(this.configUrl.updateStatusById,{
+            id: row.performId,
+            status: row.status == 1 ? 0 : 1
+          });
+        }).then(() => {
+          this.getList()
+          this.$modal.msgSuccess(`${row.status == 1 ? '上架' : '下架'}成功`);
+        }).catch((e) => {
+          console.error("失败====",e)
+        });
+      },
+      /** 设置使用期限  */
+      setUseType(row){
+        if(row.validityDay == -1) {
+          return '永久生效'
+        }else if(!row.validityDay && row.validityDay != 0){
+          return '--'
+        }else {
+          return '' + row.validityDay + '内有效'
+        }
+      },
+      // 生效日期
+      setEffectiveDateType(row){
+        if(row.validityType == 0) {
+          return '按激活日期生效'
+        }else if(row.validityType == 1) {
+          return '按购买日期生效'
+        }else{
+          return '--'
+        }
+      },
+      // 支持储值
+      setIsStorageValue(row){
+        if(row.isStorageValue == 0) {
+          return '不可储值'
+        }else if(row.isStorageValue == 1) {
+          return row.storageMaxAmount ? ('最大储值'+row.storageMaxAmount):'可储值'
+        }else{
+          return '--'
+        }
+      },
+      // 支持积分
+      setIsCredit(row){
+        if(row.isCredit == 0) {
+          return '不可积分'
+        }else if(row.isCredit == 1) {
+          return '可积分'
+        }else{
+          return '--'
+        }
+      },
+    }
+  };
+  </script>
+  

+ 381 - 0
src/views/tourism/membershipManagement/equityCard/equityCardManage.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="20">
+      <!--用户数据-->
+      <el-col :span="24" :xs="24">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+          <el-form-item label="卡号" prop="cardNo">
+            <el-input
+              v-model="queryParams.cardNo"
+              placeholder="请输入卡号"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="持卡人" prop="name">
+            <el-input
+              v-model="queryParams.name"
+              placeholder="请输入持卡人"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="手机号" prop="mobile">
+            <el-input
+              v-model="queryParams.mobile"
+              placeholder="请输入手机号"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="卡种" prop="equitycardId">
+            <el-select v-model="queryParams.equitycardId" clearable placeholder="请选择卡种">
+              <el-option
+                v-for="dict in tableListCopy"
+                :key="dict.id"
+                :label="dict.name"
+                :value="dict.id">
+              </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-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="configPermi.add"
+            >添加新卡</el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+        </el-row>
+
+        <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
+          <el-table-column type="index" label="序号" align="center"  />
+          <el-table-column label="卡号" align="center" key="cardNo" prop="cardNo" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="持卡人" align="center" key="name" prop="name" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="手机号" align="center" key="mobile" prop="mobile" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="卡种" align="center" key="equitycardName" prop="equitycardName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="激活时间" align="center" key="actTime" prop="actTime" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="到期时间" align="center" key="validityEnd" prop="validityEnd" v-if="columns[5].visible" :show-overflow-tooltip="true">
+            <template slot-scope="scope">
+              <span>{{ scope.row.validityEnd }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" align="center" key="actStatus" prop="actStatus" v-if="columns[6].visible" :show-overflow-tooltip="true">
+            <template slot-scope="scope">
+              <dict-tag :options="dict.type.activate_status" :value="scope.row.actStatus"/>
+            </template>
+          </el-table-column>
+          <el-table-column label="禁用/启用" align="center" key="status1" prop="status1" v-if="columns[7].visible" :show-overflow-tooltip="true">
+            <template slot-scope="scope">
+              <switchBox 
+              :defaultChecked="true" 
+              v-model="scope.row.status" 
+              @changeFun="openAttraction(scope.row)" 
+              :disabled="false"
+              :active-value="1"
+              :inactive-value="0"
+               />
+            </template>
+          </el-table-column>
+          <el-table-column label="最近消费时间" align="center" key="lastUseTime" prop="lastUseTime" v-if="columns[8].visible" :show-overflow-tooltip="true" />
+          <el-table-column
+            label="操作"
+            align="center"
+            width="160"
+            class-name="small-padding fixed-width"
+          >
+            <template slot-scope="scope" >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-document"
+                @click="handleDetails(scope.row)"
+                v-hasPermi="configPermi.details"
+              >详情</el-button>
+              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="[configPermi.resetPwd, 'configPermi.edit']">
+                  <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
+                  <el-dropdown-menu slot="dropdown">
+                      <el-dropdown-item command="handleAuthRole" v-if="scope.row.actStatus != 1" icon="el-icon-circle-check"
+                      v-hasPermi="configPermi.AuthRole">审核</el-dropdown-item>
+                      <!-- <el-dropdown-item command="handleEdit" icon="el-icon-circle-check"
+                      v-hasPermi="configPermi.edit">编辑</el-dropdown-item> -->
+                      <el-dropdown-item command="handleResetPassword" icon="el-icon-circle-check"
+                      v-hasPermi="configPermi.Password">重置密码</el-dropdown-item>
+                  </el-dropdown-menu>
+              </el-dropdown>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total>0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+    <!--  新增或修改  -->
+    <addAndEdit ref="addAndEdit" @refresh="getList" />
+    <!--  详情 -->
+    <detailsBox ref="detailsBox" />
+  </div>
+</template>
+
+<script>
+import { 
+  listTableApi, 
+  delTableParamsApi,
+  updateTableApi,
+  addTableApi
+} from "@/api/CURD";
+import addAndEdit from "./formBox/equityCardManagementForm.vue"
+import detailsBox from "./detailsBox/equityCardManagementDetails.vue"
+export default {
+  name: "User",
+  dicts: ['activate_status'],
+  components: {addAndEdit,detailsBox},
+  data() {
+    return {
+      title: "权益卡管理",// 通用标题
+      configPermi: {
+        add: ['equityCard:equityCardManagement:add'], // 新增权限
+        details: ['equityCard:equityCardManagement:details'], // 详情权限
+        delect: [], // 删除权限
+        edit: [], // 编辑权限
+        upload: [''],// 导入权限
+        export: [''],// 导出权限
+        AuthRole: ['equityCard:equityCardManagement:AuthRole'],// 设置审核
+        Password: ['equityCard:equityCardManagement:Password'], // 重置密码
+      },
+      configUrl: {
+        list: '/merchant/memberEquityCard/pageList', // 列表地址
+        delect: '', // 删除地址
+        upload: '',// 导入地址
+        download:'', // 下载模板地址
+        export: '',// 导出地址
+        updateStatus: '/merchant/memberEquityCard/updateStatus', // 禁用/启用
+        resetPassword: '/merchant/memberEquityCard/resetPwd', //重置密码
+        listCopy: '/merchant/equityCard', // 卡种
+      },
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      tableList: null,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      dateRange: [],
+      // 控制列表是否显示
+      columns: [
+        { key: 0, label: `卡号`, visible: true },
+        { key: 1, label: `持卡人`, visible: true },
+        { key: 2, label: `手机号`, visible: true },
+        { key: 3, label: `卡种`, visible: true },
+        { key: 5, label: `激活时间`, visible: true },
+        { key: 6, label: `到期时间`, visible: true },
+        { key: 9, label: `状态`, visible: true },
+        { key: 10, label: `禁用/启用`, visible: true },
+        { key: 11, label: `最近消费时间`, visible: true },
+      ],
+      tableListCopy: []// 权益卡类型
+    };
+  },
+  created() {
+    this.getListCopy()
+    this.getList();
+  },
+  methods: {
+    /** 查询权益卡类型列表 */
+    getListCopy() {
+      listTableApi(
+        this.configUrl.listCopy,
+        this.addDateRange(
+          this.queryParams, 
+          this.dateRange)).then(response => {
+            this.tableListCopy = response.rows;
+        }
+      ).catch (error=>{
+        console.error('获取列表失败!!!!',error)
+        this.tableListCopy = [];
+      }) 
+    },
+    /** 查询用户列表 */
+    getList() {
+      this.loading = true;
+      listTableApi(
+        this.configUrl.list,
+        this.addDateRange(
+          this.queryParams, 
+          this.dateRange)).then(response => {
+            this.tableList = response.rows;
+            this.total = response.total;
+            this.loading = false;
+        }
+      ).catch (error=>{
+        console.error('获取列表失败!!!!',error)
+        this.tableList = [];
+        this.total = 0;
+        this.loading = false
+      }) 
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+      }
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      if(this.$refs.addAndEdit) {
+        this.$refs.addAndEdit.initData(this.title + '新增', "ADD",{})
+      }
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      if(this.$refs.addAndEdit) {
+        this.$refs.addAndEdit.initData(this.title + '编辑', "EDITInit",{...row})
+      }
+    },
+    handleDetails(row){
+      if(this.$refs.detailsBox) {
+        this.$refs.detailsBox.initData(this.title + '详情', "EDITInit",{...row})
+      }
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除数据项?').then( () => {
+        return delTableParamsApi(this.configUrl.delect,{
+          id: ids
+        });
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch((e) => {
+        console.error("删除失败====",e)
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(this.configUrl.export, {
+        ...this.queryParams
+      }, `${this.title }_${new Date().getTime()}.xlsx`)
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      if(this.$refs.upload) {
+        this.$refs.upload.initData({
+          width: '400px',
+          // 弹出层标题(用户导入)
+          title: this.title + "导入",
+          // 下载模板地址
+          importTemplate: this.configUrl.download,
+          // 上传的地址
+          url: this.configUrl.upload
+        })
+      }
+    },
+    /** 开/闭 园 */
+    openAttraction(row) {
+      this.$modal.confirm(`是否确认${row.status == 0 ? '启用' : '禁用'} ${row.cardNo||''}吗?`).then( () => {
+        return addTableApi(this.configUrl.updateStatus,{
+          id: row.id,
+          status: row.status == 1 ? 0 : 1
+        });
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess(`${row.status == 0 ? '启用' : '禁用'}成功`);
+      }).catch((e) => {
+        console.error("失败====",e)
+      });
+    },
+    /**  重置密码   */
+    handleResetPassword(row){
+      this.$modal.confirm(`是否确认重置卡号 ${row.cardNo||''}的密码吗?`).then( () => {
+        return addTableApi(this.configUrl.resetPassword,{
+          id: row.id,
+        });
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess(`重置成功`);
+      }).catch((e) => {
+        console.error("失败====",e)
+      });
+    },
+      handleAuthRole(row) {
+          if(this.$refs.detailsBox) {
+          this.$refs.detailsBox.initData(this.title + '审核', "DEATILSADD",{...row})
+          }
+      },
+      // 更多操作触发
+      handleCommand(command, row) {
+        switch (command) {
+            case "handleAuthRole":
+            this.handleAuthRole(row);
+            break;
+            case "handleEdit":
+            this.handleUpdate(row);
+            break;
+            case "handleResetPassword":
+            this.handleResetPassword(row);
+            break;
+            default:
+            break;
+        }
+      },
+      /** 设置使用期限  */
+      setUseType(row){
+        if(row.useType == 1) {
+          return '永久生效'
+        }else if(row.useType == 2) {
+          return '' + (row.useDay || '') + '天有效'
+        }else if(row.useType == 3) {
+          return '' + row.useEndDay + '内有效'
+        }else{
+          return '--'
+        }
+      },
+  }
+};
+</script>

+ 522 - 0
src/views/tourism/membershipManagement/equityCard/formBox/equityCardAllocationForm.vue

@@ -0,0 +1,522 @@
+<template>
+  <el-dialog 
+  :title="title" 
+  :visible.sync="open" 
+  width="70%" 
+  append-to-body 
+  :close-on-click-modal="false"
+    @close="cancel">
+    <div class="form-dialog-box" v-loading="loading" :element-loading-text="loadingText"
+      element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0)">
+      <div v-loading="loading" :element-loading-text="''" element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)">
+        <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+          <div class="form-title"><span>基本信息</span></div>
+          <el-form-item label="权益卡名称:" prop="name">
+            <el-input style="width: 100%;" v-model="form.name" placeholder="请输入权益卡名称" maxlength="50"
+              show-word-limit />
+          </el-form-item>
+          <el-form-item label="权益卡价格:" prop="salePrice">
+            <el-input-number v-model="form.salePrice" placeholder="请输入权益卡价格" controls-position="right">
+            </el-input-number>
+            <span>元</span>
+          </el-form-item>
+          <div class="form-title"><span>使用规则</span></div>
+          <el-form-item label="使用期限:" prop="validityDayS">
+            <el-radio-group v-model="form.validityDayS" @input="radioInputs">
+              <div style="display: flex;flex-direction: column;padding-top: 10px;">
+                <div>
+                  <el-radio :label="-1">永久生效</el-radio>
+                </div>
+                <div style="display: flex;align-items: center;margin-top: 25px;">
+                  <el-radio style="display: flex;align-items: center;" :label="2">
+                    <div style="display: flex;align-items: center;">
+                      <el-form-item label="" label-width="0" :prop="'validityDay'">
+                        <span>指定</span>
+                        <el-input-number :disabled="form.validityDayS != 2" v-model="form.validityDay"
+                          placeholder="请输入天数" controls-position="right">
+                        </el-input-number>
+                        <span>天有效</span>
+                      </el-form-item>
+                    </div>
+                  </el-radio>
+                </div>
+                <!-- <div style="display: flex;align-items: center;margin-top: 25px;">
+                  <el-radio style="display: flex;align-items: center;" :label="3">
+                    <div style="display: flex;align-items: center;">
+                      <el-form-item label="" label-width="0" :prop="'useEndDay'">
+                        <span>指定</span>
+                        <el-date-picker :disabled="form.useType != 3" v-model="form.useEndDay"
+                        type="date" placeholder="请选择日期" value-format="yyyy-MM-dd"
+                          >
+                        </el-date-picker>
+                        <span>结束日期</span>
+                      </el-form-item>
+                    </div>
+                  </el-radio>
+
+                </div> -->
+              </div>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="生效日期:" prop="validityType">
+            <el-radio-group v-model="form.validityType">
+              <el-radio :label="0">按激活日期生效</el-radio>
+              <el-radio :label="1">按购买日期生效</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <!-- <div class="form-title"><span>激活规则</span></div>
+          <el-form-item label="激活后完善信息:" prop="activateType">
+            <el-checkbox-group v-model="form.activateType" @change="changeGroup">
+              <el-checkbox 
+              v-for="dict in dict.type.activate_type"
+              :key="dict.value"
+              :label="dict.value">{{dict.label}}</el-checkbox>
+            </el-checkbox-group>
+          </el-form-item> -->
+          <div class="form-title"><span>权益规则</span></div>
+          <el-form-item label="门票折扣权益:">
+            <div style="display: flex;align-items: center;">
+              <el-form-item label="基本折扣:" prop="benefitList" label-width="100px">
+                <el-input-number style="width: 150px;" v-model="form.benefitList" controls-position="right" placeholder="请输入基本折扣"></el-input-number>
+                <span style="padding-bottom: 15px;">%</span>
+              </el-form-item>
+              <!-- <el-button style="margin-left: 15px;" v-if="!form.discountGoodList||form.discountGoodList.length==0" type="primary" @click="addClassifyList">添加单品</el-button> -->
+            </div>
+            
+            <!-- <div v-for="(item,index) in form.discountGoodList" :key="index" style="margin-top: 10px;display: flex;align-items: center;">
+              <el-form-item label="单品折扣:" label-width="100px">
+                <el-select v-model="form.discountGoodList[index].goodId" clearable placeholder="请选择单品">
+                  <el-option
+                    v-for="item in scenicAreaProducts"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+                <el-input-number style="width: 150px;margin-left: 20px;" v-model="form.discountGoodList[index].benefitList" placeholder="请输入单品折扣" controls-position="right"></el-input-number>
+                <span style="padding-bottom: 15px;">%</span>
+              </el-form-item>
+              <el-button style="margin-left: 15px;" v-if="form.discountGoodList.length==(index+1)" type="primary" @click="addClassifyList">添加单品</el-button>
+              <el-button style="margin-left: 15px;" type="danger" @click="clearClassifyList(index)">移除</el-button>
+            </div> -->
+          </el-form-item>
+          <el-form-item label="持卡须知:" prop="remark">
+            <el-input style="width: 100%;" type="textarea" v-model="form.remark" placeholder="请输入持卡须知" maxlength="200"
+              show-word-limit />
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus == 1">
+      <el-button @click="cancel" :loading="loading">关闭</el-button>
+      <el-button 
+      type="primary" 
+      @click="submitForm(true)" 
+      :loading="loading">
+              {{ loading ? '提交中...' : '提交' }}
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import {
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi
+} from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: ['activate_type'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/merchant/equityCard', // 新增地址
+        details: '/merchant/equityCard/detail', // 规格详情
+        edit: '/merchant/equityCard', // 编辑地址
+      },
+      performId: null,
+      form: {
+        id: undefined,
+        activateType: [0],
+        validityType: 0,
+        validityDayS: 2
+      },
+      rules: {
+        name: [{ required: true, message: "请输入权益卡名称", trigger: ["change", "blur"] }],
+        salePrice: [{ required: true, message: "请输入权益卡价格", trigger: ["change", "blur"] }],
+
+        validityDay: [{ required: false, message: "请选择天数", trigger: ["change", "blur"] }],
+        validityDayS: [{ required: true, message: "请输入使用期限", trigger: ["change", "blur"] }],
+        
+        validityType: [{ required: true, message: "请选择生效日期", trigger: ["change", "blur"] }],
+        activateType: [{ required: true, message: "请选择激活后完善信息", trigger: ["change", "blur"] }],
+        
+        benefitList: [{ required: true, message: "请输入基本折扣", trigger: ["change", "blur"] }],
+
+      },
+      tableList: [],// 景点产品关联
+      scenicAreaProducts: [],
+    };
+  },
+  methods: {
+    async initData(title, model, row) {
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{
+          ...row,
+          activateType: ["0"],
+          validityType: 0,
+          validityDayS: 2
+        })
+        this.radioInputs(this.form.validityDayS)
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='EDITInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details, { id })
+        if (res.code == 200) {
+          let obj = {
+            ...res.data,
+            activateType: res.data.activateType?res.data.activateType.split('|'):[]
+          }
+          if(res.data.benefitList && res.data.benefitList.length>0) {
+            obj['benefitList'] = res.data.benefitList[0].benefitValue
+          }
+          this.$set(this, 'form', JSON.parse(JSON.stringify(obj)))
+          this.radioInputs(obj.validityDay)
+          console.log(this.form)
+          this.formStatus = 1
+        } else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          //this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!', error)
+        this.formStatus = 2
+        this.loading = false
+        //this.open = false;
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm(type) {
+      console.log("dsfsfds=======", type, this.form)
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          let params = JSON.parse(JSON.stringify(this.form))
+          if(params.validityDayS == -1) {
+            params.validityDay = -1
+          }
+          delete params.validityDayS
+          if(this.model == 'ADD') {
+            addTableApi(this.configUrl.edit, {
+              ...params,
+              benefitList: [{
+                benefitType: 0,
+                benefitValue: params.benefitList
+              }],
+              activateType: params.activateType?params.activateType.join('|'):null,
+            }).then(response => {
+              this.$modal.msgSuccess(`${this.form.id ? '编辑' : '新增'}成功`);
+              this.loading = false
+              this.$set(this, 'form', {activateType:[]})
+              this.$nextTick(() => {
+                this.$refs.form.clearValidate();
+              })
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(() => {
+              this.$message.error(`${this.form.id ? '编辑' : '新增'}失败!!!`);
+              this.loading = false
+            })
+          }else {
+            updateTableApi(this.configUrl.edit, {
+              ...params,
+              benefitList: [{
+                benefitType: 0,
+                benefitValue: params.benefitList
+              }],
+              activateType: params.activateType?params.activateType.join('|'):null,
+            }).then(response => {
+              this.$modal.msgSuccess(`${this.form.id ? '编辑' : '新增'}成功`);
+              this.loading = false
+              this.$set(this, 'form', {activateType:[]})
+              this.$nextTick(() => {
+                this.$refs.form.clearValidate();
+              })
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(() => {
+              this.$message.error(`${this.form.id ? '编辑' : '新增'}失败!!!`);
+              this.loading = false
+            })
+          }
+          
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if (this.$refs["form"]) {
+        //this.$refs["form"].resetFields();
+        this.$set(this, 'form', {activateType:[]})
+        this.$nextTick(() => {
+          this.$refs["form"].clearValidate();
+        })
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    /** */
+    radioInputs(value) {
+      if (value == -1) {
+        this.$set(this.form,'validityDayS',-1)
+        this.$set(this.form,'validityDay',undefined)
+        this.rules.validityDay[0].required = false
+        if(this.$refs.form) {
+          this.$refs.form.clearValidate('validityDay');
+        }
+        
+      } else {
+        this.$set(this.form,'validityDayS',2)
+        this.rules.validityDay[0].required = true
+        if(this.$refs.form) {
+          this.$refs.form.clearValidate('validityDay');
+        }
+      } 
+    },
+    /** 填加单品  */
+    addClassifyList(){
+      let list = []
+      if(this.form.discountGoodList) {
+        list = JSON.parse(JSON.stringify(this.form.discountGoodList))
+      }
+      list.push({
+        goodId: null,
+        benefitList: null
+      })
+      this.$set(this.form,'discountGoodList',list)
+    }, 
+    /** 移除单品  */
+    clearClassifyList(index) {
+      this.form.discountGoodList.splice(index,1)
+    },
+    changeGroup(value) {
+      console.log("value===",value)
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+
+  .form-title {
+    padding: 0 0 10px 0;
+
+    span {
+      display: flex;
+      color: rgba(65, 80, 88, 1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+
+  }
+
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+
+    &-text {
+      margin-top: -10px;
+    }
+  }
+
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.el-table {
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+
+    &-text {
+      margin-top: -10px;
+    }
+  }
+
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+
+    .el-input__inner {
+      display: none !important;
+    }
+
+    span.el-input__suffix {
+      position: inherit !important;
+
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+
+::v-deep .avatar-uploader .el-upload:hover {
+  border-color: #409EFF;
+}
+
+::v-deep .avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+
+::v-deep .avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 537 - 0
src/views/tourism/membershipManagement/equityCard/formBox/equityCardManagementForm.vue

@@ -0,0 +1,537 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="50%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div
+        v-loading="loading"
+        :element-loading-text="''"
+        element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+        <el-form :model="form" ref="form" :rules="rules" label-width="150px">
+          <div class="form-title"><span>基本信息</span></div>
+          <el-form-item label="办卡类型:" prop="equityCardId">
+            <el-select style="width: 100%;" v-model="form.equityCardId" clearable placeholder="请选择卡类型">
+              <el-option
+                v-for="dict in tableList"
+                :key="dict.id"
+                :label="dict.name"
+                :value="dict.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="持卡人:" prop="memberId">
+            <el-select style="width: 100%;" v-model="form.memberId" @change="selectUser" clearable placeholder="请选择持卡人">
+              <el-option
+                v-for="dict in tableUseList"
+                :key="dict.id"
+                :label="dict.name"
+                :value="dict.id">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="身份证号:" prop="idcard">
+            <el-input v-model="form.idcard" controls-position="right" placeholder="请输入身份证号"></el-input>
+          </el-form-item>
+          <el-form-item label="手机号:" prop="mobile">
+            <div style="display: flex;">
+              <el-input v-model="form.mobile" controls-position="right" placeholder="请输入手机号"></el-input>
+              <el-button @click="getCode" style="margin-left: 20px;" type="primary" :loading="phoneCodeLoading == 1">{{ phoneCodeLoading == 1 ? '获取中...' : phoneCodeLoading == 0 ? '获取验证码' : '已发送成功,重新获取' }}</el-button>
+            </div>
+          </el-form-item>
+          <el-form-item label="短信验证码:" prop="code">
+            <el-input v-model="form.code" controls-position="right" placeholder="请输入短信验证码"></el-input>
+          </el-form-item>
+          <div class="form-title"><span>验证信息</span></div>
+          <el-form-item label="人脸图片:" prop="ocrPic">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.ocrPic" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.ocrPic">
+                </el-image>
+                <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                  <i class="el-icon-error"></i>
+                </span>
+              </div>
+              <div 
+              style="width: 100px; height: 100px;" 
+              v-if="!form.ocrPic||form.ocrPic.length<1"
+              v-loading="actionUrlLoading"
+              element-loading-text="上传中..."
+              element-loading-spinner="el-icon-loading"
+              element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <el-upload
+                  class="avatar-uploader"
+                  :action="actionUrl"
+                  :data="{
+                    bucket: 'tourism'
+                  }"
+                  :show-file-list="false"
+                  :before-upload="beforeAvatarUpload"
+                  :on-success="handleAvatarSuccess"
+                  :on-progress="handleAvatarProgress"
+                  :disabled="actionUrlLoading"
+                  :on-error="handleAvatarError"
+                  >
+                  <i class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
+              
+            </div>
+            <span>支持jpg、png,支持5MB大小以内的图片上传</span>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus==1">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        :loading="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      > 
+        {{ loading ? '提交中...' : '保存' }}
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi,
+  listTableApi,
+ } from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: [],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/merchant/memberEquityCard', // 新增地址
+        details: '/merchant/memberEquityCard/detail', // 详情地址
+        edit: '/merchant/memberEquityCard', // 编辑地址
+        list: '/merchant/equityCard', // 权益卡类型
+        codeList: '/merchant/merchantAuth/getVerifyCode', // 获取验证码
+        merchantRealAuth: '/merchant/merchantAuth/merchantRealAuth', // 验证
+        useCode: '/member/memberInfo/list', // 
+      },
+      form: {
+        id: undefined,
+        ocrPic: []
+      },
+      rules: {
+        equityCardId: [{ required: true, message: "请选择办卡类型", trigger: ["change","blur"] }],
+        memberId: [{ required: true, message: "请输入持卡人", trigger: ["change","blur"] }],
+        idcard: [{ required: true, message: "请输入身份证号", trigger: ["change","blur"] }],
+        mobile: [
+          { required: true, trigger: ["change","blur"], message: "请输入您的账号" },
+          { pattern: /^1[3-9]\d{9}$/, message: '手机号格式不正确', trigger: ["change","blur"] }
+        ],
+        code: [{ required: true, message: "请输入短信验证码", trigger: ["change","blur"] }],
+        ocrPic: [{ required: true, message: "请上传图片", trigger: ["change","blur"] }]
+      },
+      scenicAreaProducts: [],// 景点产品关联
+
+      tableList: [], // 权益卡类型
+      tableUseList: [], // 用户
+      phoneCodeLoading: 0,
+      //  上传文件
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
+    };
+  },
+  created() {
+    this.getList()
+    this.getUseList()
+  },
+  methods: {
+    /** 查询体卡类型列表 */
+    getList() {
+      listTableApi(
+        this.configUrl.list,
+        this.addDateRange({
+          pageNum: 1,
+          pageSize: 9999,
+        })).then(response => {
+              this.tableList = response.rows;
+          }
+        ).catch (error=>{
+          this.tableList = [];
+        }) 
+    },
+    /** 查询体卡类型列表 */
+    getUseList() {
+      listTableApi(
+        this.configUrl.useCode,
+        this.addDateRange({
+          pageNum: 1,
+          pageSize: 9999,
+        })).then(response => {
+              this.tableUseList = response.data.rows;
+          }
+        ).catch (error=>{
+          this.tableUseList = [];
+        }) 
+    },
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      this.phoneCodeLoading = 0
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{...row,ocrPic:[]})
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row,
+          ocrPic: row.ocrPic?row.ocrPic.split(','):[]
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='EDITInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id})
+        if(res.code == 200) {
+          let obj = {
+            ...res.data,
+            ocrPic: res.data.ocrPic?res.data.ocrPic.split(','):[]
+        }
+          this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
+          this.formStatus = 1
+        }else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!',error)
+        this.formStatus = 2
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          try {
+            let resCode = await addTableApi(
+              this.configUrl.merchantRealAuth,
+              this.addDateRange({
+                idCard: this.form.idcard,
+                userName: this.form.userName,
+            }))
+            if(resCode.code == 200) {
+
+            }else {
+              this.$message.error("身份证信息错误!!!");
+              return
+            }
+            if (this.model != 'ADD') {
+              let res = await addTableApi(this.configUrl.edit,{
+                ...this.form,
+                ocrPic: this.form.ocrPic.join(',')
+              })
+              if(res.code == 200) {
+                this.$modal.msgSuccess("修改成功");
+                this.loading = false
+                this.open = false;
+                this.$emit('refresh')
+              }else {
+                this.$message.error("修改失败!!!");
+                this.loading = false
+              }
+            } else {
+              let res = await addTableApi(this.configUrl.edit,{...this.form,ocrPic: this.form.ocrPic.join(',')})
+              if(res.code == 200) {
+                this.$modal.msgSuccess("新增成功");
+                this.loading = false
+                this.open = false;
+                this.$emit('refresh')
+              }else {
+                this.$message.error("新增失败!!!");
+                this.loading = false
+              }
+            }
+          } catch (error) {
+            this.$message.error(`${this.form.id?'修改':'新增'}失败!!!`);
+            this.loading = false
+          }
+          
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    /**
+     * 获取验证码
+     */
+     getCode() {
+      if(this.phoneCodeLoading == 1) return
+      let reg = /^1[3-9]\d{9}$/
+      if(!reg.test(this.form.mobile)) {
+        this.$message.error("手机号输入不正确!!!");
+        return
+      }
+      this.phoneCodeLoading = 1
+      addTableApi(
+        this.configUrl.codeList,
+        this.addDateRange({
+          phone: this.form.mobile,
+        })).then(response => {
+          this.phoneCodeLoading = 2
+        }).catch (error=>{
+          this.phoneCodeLoading = 0
+        }) 
+     },
+     /**  上传图片 单张  */
+    handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.ocrPic.push(response.data.url)
+      }
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 5;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 5MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.ocrPic.splice(index,1)
+    },
+    selectUser(value) {
+      console.log(value)
+      this.tableUseList.forEach((item,index) => {
+        if(item.id == value) {
+          this.$set(this.form,'userName',item.name)
+        }
+      });
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 227 - 0
src/views/tourism/productManagement/detailsBox/qrCode.vue

@@ -0,0 +1,227 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="300px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div style="width: 100%;height: 100%;display: flex;justify-content: center;">
+        <img width="200px" height="200px" :src="qrCodeImage" alt="暂无图片">
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="qrCodeImage">
+      <el-button type="text" @click="downloadIamge(qrCodeImage,'小程序二维码'+new Date().getTime())">
+        <i class="el-icon-download"></i>
+        下载
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: "QRCodeDetails",
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      qrCodeImage: '',// 二维码
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.model = model
+      this.qrCodeImage = row.appletQrcode
+      this.formStatus = 1
+      this.loading = false
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    downloadIamge(src, imgName){
+      let image = new Image()
+      image.src = src
+      image.setAttribute("crossOrigin", "anonymous")
+      image.onload = function() {
+          let c = document.createElement("canvas")
+          c.width = image.width
+          c.height = image.height
+          c.getContext("2d").drawImage(image, 0, 0, image.width, image.height)
+          let a = document.createElement("a")
+          a.download = imgName
+          a.href = c.toDataURL("image/png")
+          a.click()
+      }
+    }
+  },
+  watch: {}
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  height: 200px;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+.el-table{
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 1 - 0
src/views/tourism/productManagement/hotelsManagement.vue

@@ -79,6 +79,7 @@
             <el-table-column
               label="操作"
               align="center"
+              width="300px"
               class-name="small-padding fixed-width"
             >
               <template slot-scope="scope" >

+ 17 - 2
src/views/tourism/productManagement/scenicAreaTickets.vue

@@ -40,6 +40,13 @@
               class-name="small-padding fixed-width"
             >
               <template slot-scope="scope" >
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-menu"
+                  @click="handleQRcode(scope.row)"
+                  v-hasPermi="configPermi.qrCode"
+                >二维码</el-button>
                 <el-button
                   size="mini"
                   type="text"
@@ -77,6 +84,7 @@
       <!--  新增或修改  -->
       <addAndEdit ref="addAndEdit" @refresh="getList" />
       <addAndEditSpecs ref="addAndEditSpecs" @refresh="getList" />
+      <qrCode ref="qrCode" />
     </div>
   </template>
 
@@ -88,10 +96,11 @@
     } from "@/api/CURD";
   import addAndEdit from "./formBox/scenicAreaTicketsForm.vue"
   import addAndEditSpecs from "./formBox/scenicAreaTicketsSpecsForm.vue"
+  import qrCode from "./detailsBox/qrCode.vue"
   export default {
     name: "User",
     dicts: [],
-    components: {addAndEdit,addAndEditSpecs},
+    components: {addAndEdit,addAndEditSpecs,qrCode},
     data() {
       return {
         title: "景区门票",// 通用标题
@@ -103,7 +112,8 @@
           editGuige: ['productManagement:scenicAreaTickets:editGuige'], // 编辑规格信息权限
           upload: [''],// 导入权限
           export: [''],// 导出权限
-          release: ['']
+          release: [''],
+          qrCode: ['productManagement:scenicAreaTickets:qrCode'], // 新增权限
         },
         configUrl: {
           list: '/merchant/merchantPerformAuditorium/merchantPerformList', // 列表地址
@@ -259,6 +269,11 @@
           console.error("失败====",e)
         });
       },
+      handleQRcode(row) {
+        if(this.$refs.qrCode) {
+          this.$refs.qrCode.initData('小程序页面二维码',"DEATILSInit", row)
+        }
+      }
     }
   };
   </script>

+ 19 - 3
src/views/tourism/productManagement/tabelBox/cateringManagementCategoryTabel.vue

@@ -90,9 +90,16 @@
                 label="操作"
                 align="center"
                 class-name="small-padding fixed-width"
-                width="180px"
+                width="220px"
               >
                 <template slot-scope="scope" >
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-menu"
+                    @click="handleQRcode(scope.row)"
+                    v-hasPermi="configPermi.qrCode"
+                  >二维码</el-button>
                   <el-button
                     size="mini"
                     type="text"
@@ -135,6 +142,7 @@
     <addAndEditBox ref="addAndEditBox" :listTreeCopy="listTreeCopy" @refresh="getList" />
     <!--  详情   -->
     <detailsBox ref="detailsBox" @refresh="getList"></detailsBox>
+    <qrCode ref="qrCode" />
   </el-dialog>
 </template>
 
@@ -149,6 +157,7 @@ import addAndEditBox from "../formBox/commodityListForm.vue"
 import detailsBox from "../detailsBox/commodityListDetails.vue"
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import qrCode from "../detailsBox/qrCode.vue"
 
 export default {
   name: "CateringManagementCategoryTabel",
@@ -156,7 +165,8 @@ export default {
   components: {
     addAndEditBox,
     Treeselect,
-    detailsBox
+    detailsBox,
+    qrCode
   },
   data() {
     return {
@@ -174,7 +184,8 @@ export default {
           edit: ['cateringManagement:cateringManagementCategoryTabel:edit'], // 编辑基本信息权限
           upload: [''],// 导入权限
           export: [''],// 导出权限
-          release: ['']
+          release: [''],
+          qrCode: ['cateringManagement:cateringManagementCategoryTabel:qrCode'], // 新增权限
         },
         configUrl: {
           list: '/merchant/merchantPerformAuditorium/shopGoodsList', // 列表地址
@@ -394,6 +405,11 @@ export default {
     cancel() {
       this.open = false;
     },
+    handleQRcode(row) {
+      if(this.$refs.qrCode) {
+        this.$refs.qrCode.initData('小程序页面二维码',"DEATILSInit", row)
+      }
+    }
   },
   watch: {
 

+ 18 - 2
src/views/tourism/productManagement/tabelBox/hotelsManagementCategoryTabel.vue

@@ -74,6 +74,13 @@
                 width="200px"
               >
                 <template slot-scope="scope" >
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-menu"
+                    @click="handleQRcode(scope.row)"
+                    v-hasPermi="configPermi.qrCode"
+                  >二维码</el-button>
                   <el-button
                     size="mini"
                     type="text"
@@ -118,6 +125,7 @@
     <detailsBox ref="detailsBox" @refresh="getList"></detailsBox>
     <!--  日期价格 -->
     <dateList ref="dateList" />
+    <qrCode ref="qrCode" />
   </el-dialog>
 </template>
 
@@ -133,6 +141,7 @@ import detailsBox from "../detailsBox/commodityListDetails.vue"
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import dateList from "../formBox/hotelsManagementDataTabel.vue"
+import qrCode from "../detailsBox/qrCode.vue"
 export default {
   name: "CateringManagementCategoryTabel",
   dicts: [],
@@ -140,7 +149,8 @@ export default {
     addAndEditBox,
     Treeselect,
     detailsBox,
-    dateList
+    dateList,
+    qrCode
   },
   data() {
     return {
@@ -159,7 +169,8 @@ export default {
           dateList: ['hotelsManagement:hotelsManagementCategoryTabel:dateList'], // 编辑基本信息权限
           upload: [''],// 导入权限
           export: [''],// 导出权限
-          release: ['']
+          release: [''],
+          qrCode: ['hotelsManagement:hotelsManagementCategoryTabel:qrCode'], // 新增权限
         },
         configUrl: {
           list: '/goods/goodsHotel/pageList', // 列表地址
@@ -350,6 +361,11 @@ export default {
     cancel() {
       this.open = false;
     },
+    handleQRcode(row) {
+      if(this.$refs.qrCode) {
+        this.$refs.qrCode.initData('小程序页面二维码',"DEATILSInit", row)
+      }
+    }
   },
   watch: {