Browse Source

1. 新增/修复

MONSTER-ygh 11 months ago
parent
commit
611818cff8

+ 3 - 8
src/views/tourism/financialManagement/detailsBox/ticketOrdersDetails.vue

@@ -39,13 +39,8 @@
             <el-form-item label="身份证号:">
               <span style="display: block; min-width: 250px;">{{ form.memberCardId}}</span>
             </el-form-item>
-          </div>
-          <div style="display: flex;">
             <el-form-item label="景区名称:">
-              <span style="display: block; min-width: 250px;">{{ form.auditoriumName }}</span>
-            </el-form-item>
-            <el-form-item label="点位名称:">
-              <span style="display: block; min-width: 250px;">{{ form.seatTypeName}}</span>
+              <span style="display: block; min-width: 250px;">{{ form.scenicName }}</span>
             </el-form-item>
           </div>
 
@@ -93,9 +88,9 @@
               <el-table-column label="姓名" align="center" key="name" prop="name" :show-overflow-tooltip="true" />
               <el-table-column label="身份证号" align="center" key="idcard" prop="idcard" :show-overflow-tooltip="true" />
               <el-table-column label="取票码" align="center" key="qrcodeNo" prop="qrcodeNo" :show-overflow-tooltip="true" />
-              <el-table-column label="核销状态" align="center" key="qrcodeStatus" prop="qrcodeStatus" :show-overflow-tooltip="true">
+              <el-table-column label="核销状态" align="center" key="status" prop="status" :show-overflow-tooltip="true">
                 <template slot-scope="scope">
-                  <dict-tag :options="dict.type.tourism_ticketOrders_qrcodeStatus" :value="scope.row.qrcodeStatus"/>
+                  <dict-tag :options="dict.type.tourism_ticketOrders_status" :value="scope.row.status"/>
                 </template>
               </el-table-column>
               <el-table-column label="核销时间" align="center" key="qrcodeUseTime" prop="qrcodeUseTime" :show-overflow-tooltip="true" />

+ 145 - 94
src/views/tourism/marketingActivities/couponAllocationSet.vue

@@ -9,66 +9,110 @@
     element-loading-background="rgba(0, 0, 0, 0.8)"
     >
         <el-form :model="form" ref="form" size="small" :rules="rules" label-width="120px">
-            <div class="form-title"><span>基本信息</span></div>
-            <el-form-item label="积分功能:" prop="status">
-                <el-radio-group v-model="form.status">
+            <div class="form-title"><span>首页派券</span></div>
+            <el-form-item label="开启/禁用:" prop="isIndex">
+                <el-radio-group v-model="form.isIndex">
                     <el-radio :label="1">关闭</el-radio>
                     <el-radio :label="2">开启</el-radio>
                 </el-radio-group>
             </el-form-item>
-            <el-form-item label="优惠卷:" prop="detailsArr">
-                <selectUser 
-                    v-model="form.detailsArr"
-                    title="新增提拔人员" 
-                    @submitForm="()=>$refs.form.validateField('detailsArr')">
-                </selectUser>
+            <el-form-item label="优惠卷:" v-if="form.isIndex == 2" prop="indexSendVoList">
+                <selectMoreBox 
+                    v-model="form.indexSendVoList"
+                    listUrl="/merchant/merchantCouponInfo/pageList"
+                    nameKey="couponName"
+                    selectKey="couponName"
+                    :params="{
+                        status: 2
+                    }"
+                    title="新增优惠卷" 
+                    placeholder="请点击添加,选择优惠券"
+                    @submitForm="()=>$refs.form.validateField('indexSendVoList')">
+                </selectMoreBox>
+            </el-form-item>
+            <div class="form-title"><span>优惠券专区派券</span></div>
+            <el-form-item label="开启/禁用:" prop="isZone">
+                <el-radio-group v-model="form.isZone">
+                    <el-radio :label="1">关闭</el-radio>
+                    <el-radio :label="2">开启</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item label="优惠卷:" v-if="form.isZone == 2" prop="zoneSendVoList">
+                <selectMoreBox 
+                    v-model="form.zoneSendVoList"
+                    listUrl="/merchant/merchantCouponInfo/pageList"
+                    nameKey="couponName"
+                    selectKey="couponName"
+                    :params="{
+                        status: 2
+                    }"
+                    placeholder="请点击添加,选择优惠券"
+                    title="新增优惠卷" 
+                    @submitForm="()=>$refs.form.validateField('zoneSendVoList')">
+                </selectMoreBox>
+            </el-form-item>
+            <el-form-item label="支付场景:" v-if="form.isZone == 2" prop="playType">
+                <el-radio-group v-model="form.playType">
+                    <el-radio :label="1">购买门票</el-radio>
+                </el-radio-group>
             </el-form-item>
-            <div style="display: flex;align-items: center;">
-                <el-form-item v-if="form.isDischarge==2" label="积分抵现系数" prop="dischargeRate">
-                  <el-input-number style="width: 300px" v-model="form.dischargeRate"  placeholder="请输积分抵现系数" controls-position="right"></el-input-number>
-                </el-form-item>
-                <span style="margin-left: 15px; padding-bottom:15px; font-size: 12px;color: #ccc;"></span>
-            </div>
-            <div v-if="form.status==2" style="display: flex;align-items: center;">
-                <el-form-item label="积分奖励系数" prop="exchangeRate">
-                  <el-input-number style="width: 300px" v-model="form.exchangeRate"  placeholder="请输积分奖励系数" controls-position="right"></el-input-number>
-                </el-form-item>
-                <span style="margin-left: 15px; padding-bottom:15px; font-size: 12px;color: #ccc;">(会员下单获取积分值=实付金额*积分规则基础系数奖励系数越大,获得成长值越多,建议数值设置不要过大)</span>
-            </div>
-            <div style="display: flex;align-items: center;">
-                <el-form-item label="积分自动清零" prop="isClean">
-                    <el-radio-group v-model="form.isClean">
-                        <el-radio :label="1">关闭</el-radio>
-                        <el-radio :label="2">开启</el-radio>
-                    </el-radio-group>
-                </el-form-item>
-                <el-form-item v-if="form.isClean==2"  label="每年固定" prop="cleanTime">
-                    <el-date-picker
-                    style="width: 300px"
-                    v-model="form.cleanTime"
-                    type="datetime"
-                    format="MM-dd"
-                    value-format="MM-dd"
-                    placeholder="请选择每年固定自动清零时间">
-                    </el-date-picker>
-                </el-form-item>
-                <span v-if="form.isClean==2" style="margin-left: 15px; padding-bottom:15px; font-size: 12px;color: #ccc;">自动清零</span>
-            </div>
             
-          <el-form-item style="margin-top: 15px;">
-            <el-button :loading="loading" @click="initData()">取消</el-button>
-            <el-button
-                v-hasPermi="configPermi.seva"
-                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>
-          </el-form-item>
+            <div class="form-title"><span>支付后派券</span></div>
+            <el-form-item label="开启/禁用:" prop="isPlay">
+                <el-radio-group v-model="form.isPlay">
+                    <el-radio :label="1">关闭</el-radio>
+                    <el-radio :label="2">开启</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item label="优惠卷:" v-if="form.isPlay == 2" prop="playSendVoList">
+                <selectMoreBox 
+                    v-model="form.playSendVoList"
+                    listUrl="/merchant/merchantCouponInfo/pageList"
+                    nameKey="couponName"
+                    selectKey="couponName"
+                    :params="{
+                        status: 2
+                    }"
+                    placeholder="请点击添加,选择优惠券"
+                    title="新增优惠卷" 
+                    @submitForm="()=>$refs.form.validateField('playSendVoList')">
+                </selectMoreBox>
+            </el-form-item>
+            <div class="form-title"><span>打开小程序派券</span></div>
+            <el-form-item label="开启/禁用:" prop="isOpen">
+                <el-radio-group v-model="form.isOpen">
+                    <el-radio :label="1">关闭</el-radio>
+                    <el-radio :label="2">开启</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item label="优惠卷:" v-if="form.isOpen == 2" prop="openSendVoList">
+                <selectMoreBox 
+                    v-model="form.openSendVoList"
+                    listUrl="/merchant/merchantCouponInfo/pageList"
+                    nameKey="couponName"
+                    selectKey="couponName"
+                    :params="{
+                        status: 2
+                    }"
+                    placeholder="请点击添加,选择优惠券"
+                    title="新增优惠卷" 
+                    @submitForm="()=>$refs.form.validateField('openSendVoList')">
+                </selectMoreBox>
+            </el-form-item>
+            <el-form-item style="margin-top: 15px;">
+                <el-button :loading="loading" @click="initData()">取消</el-button>
+                <el-button
+                    v-hasPermi="configPermi.seva"
+                    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>
+            </el-form-item>
         </el-form>
     </div>
       </el-row>
@@ -80,11 +124,11 @@ import {
   getTableDeatilsByIdApi,
   addTableApi,
  } from '@/api/CURD'
- import selectUser from './formBox/selectUser.vue';
+ import selectMoreBox from './model/selectMoreBox.vue';
   export default {
     name: "IntegralRule",
     dicts: [],
-    components: {selectUser},
+    components: {selectMoreBox},
     data() {
       return {
         title: "积分规则",// 通用标题
@@ -101,18 +145,20 @@ import {
             seva: ['pointsManagement:IntegralRecord:seva'] // 保存
         },
         configUrl: {
-            details: '/merchant/creditConfig/getCreditConfig', // 详情地址
-            edit: '/merchant/creditConfig/insertOrUpdate', // 编辑地址
+            details: '/merchant/merchantCouponConfig/getInfo', // 详情地址
+            edit: '/merchant/merchantCouponConfig/insertOrUpdate', // 编辑地址
         },
         form: {},
         rules: {
-            status: [{ required: true, message: "请选择积分功能", trigger: ["change","blur"] }],
-            isDischarge: [{ required: true, message: "请选择积分抵现", trigger: ["change","blur"] }],
-            isClean: [{ required: true, message: "请选择积分自动清零", trigger: ["change","blur"] }],
-            cleanTime: [{ required: true, message: "请选择每年固定自动清零时间", trigger: ["change","blur"] }],
-            dischargeRate: [{ required: true, message: "请输积分抵现系数", trigger: ["change","blur"] }],
-            exchangeRate: [{ required: true, message: "请输入积分奖励系数", trigger: ["change","blur"] }],
-            detailsArr: [{ required: true, message: "请选择积分抵现", trigger: ["change","blur"] }],
+            isIndex: [{ required: true, message: "请选择是否首页派券", trigger: ["change","blur"] }],
+            indexSendVoList: [{ required: true, message: "请选择优惠券", trigger: ["change","blur"] }],
+            isZone: [{ required: true, message: "请选择是否优惠券专区派券", trigger: ["change","blur"] }],
+            zoneSendVoList: [{ required: true, message: "请选择优惠券", trigger: ["change","blur"] }],
+            isPlay: [{ required: true, message: "请选择是否支付后派券", trigger: ["change","blur"] }],
+            playSendVoList: [{ required: true, message: "请选择优惠券", trigger: ["change","blur"] }],
+            isOpen: [{ required: true, message: "请选择是否打开小程序派券", trigger: ["change","blur"] }],
+            openSendVoList: [{ required: true, message: "请选择优惠券", trigger: ["change","blur"] }],
+            playType: [{ required: true, message: "请选择支付场景", trigger: ["change","blur"] }],
           },
           detailsArr: []
       };
@@ -133,28 +179,16 @@ import {
             try {
                 let res = await getTableDeatilsByIdApi(this.configUrl.details,{})
                 if(res.code == 200) {
-                let obj = {
-                ...res.data
-                }
-                this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
-                this.formStatus = 1
-                this.$nextTick(()=>{
-                    if(this.form.longitude&&this.form.latitude){
-                    console.log("dsfasfdasdfasdfadsfads")
-                    this.$refs.qqMapBox.setMakerLayer({
-                        height: 0,
-                        lat: this.form.latitude,
-                        lng: this.form.longitude,
-                    },true)
+                    let obj = {
+                    ...res.data
                     }
-                    
-                })
-                
+                    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.$message.error('获取详情失败!!!');
+                    this.formStatus = 2
+                    this.loading = false
+                    this.open = false;
                 }
                 this.$nextTick(()=>{
                     this.reset()
@@ -176,11 +210,35 @@ import {
             this.$refs["form"].validate(valid => {
                 if (valid) {
                 this.loadingText = "提交数据中..."
-                return
                 this.loading = true
+                let params = JSON.parse(JSON.stringify(this.form))
+                if(this.form.isIndex == 2){
+                    params['indexSendList'] = this.form.indexSendVoList.map((item)=> item.id)
+                }else {
+                    params['indexSendList'] = []
+                }
+                if(this.form.isZone == 2){
+                    params['zoneSendList'] = this.form.zoneSendVoList.map((item)=> item.id)
+                }else {
+                    params['zoneSendList'] = []
+                }
+                if(this.form.isPlay == 2){
+                    params['playSendList'] = this.form.playSendVoList.map((item)=> item.id)
+                }else {
+                    params['playSendList'] = []
+                }
+                if(this.form.isOpen == 2){
+                    params['openSendList'] = this.form.openSendVoList.map((item)=> item.id)
+                }else {
+                    params['openSendList'] = []
+                }
+                delete params.indexSendVoList
+                delete params.zoneSendVoList
+                delete params.playSendVoList
+                delete params.openSendVoList
                 addTableApi(
                     this.configUrl.edit,{
-                    ...this.form
+                    ...params
                     }).then(response => {
                     this.$modal.msgSuccess("修改成功");
                     this.loading = false
@@ -202,13 +260,6 @@ import {
                 this.$refs["form"].clearValidate();
             }
         },
-        setDot(params){
-            this.$set(this.form,'longitude',params.lng)
-            this.$set(this.form,'latitude',params.lat)
-        },
-        submitForm1 () {
-            
-        }
     }
   };
   </script>

+ 326 - 0
src/views/tourism/marketingActivities/detailsBox/templateManagementDetails.vue

@@ -0,0 +1,326 @@
+<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="120px">
+          <div class="form-title"><span>基本信息</span></div>
+          <div style="display: flex;">
+            <el-form-item label="会员名称:">
+              <span style="display: block; min-width: 250px;">{{ form.realName }}</span>
+            </el-form-item>
+            <el-form-item label="性别:">
+              <dict-tag :options="dict.type.tourism_memberInformation_sex" :value="form.sex"/>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="手机号:">
+              <span style="display: block;min-width: 250px;">{{ form.mobile }}</span>
+            </el-form-item>
+            <el-form-item label="身份证号:">
+              <span style="display: block;min-width: 250px;">{{ form.cardId }}</span>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="注册时间:">
+              <span style="display: block;min-width: 250px;">{{ form.createTime }}</span>
+            </el-form-item>
+          </div>
+          <div class="form-title"><span>会员信息</span></div>
+          <div style="display: flex;">
+            <el-form-item label="会员类型:">
+              <span style="display: block;min-width: 250px;">
+                <dict-tag :options="dict.type.tourism_memberInformation_user_type" :value="form.type"/>
+              </span>
+            </el-form-item>
+            <el-form-item label="会员卡号:">
+              <span style="display: block;min-width: 250px;">{{ form.memberCode }}</span>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="剩余积分:">
+              <span style="display: block;min-width: 250px;">{{ form.credit }}</span>
+            </el-form-item>
+            <el-form-item label="剩余储值:">
+              <span style="display: block;min-width: 250px;">{{ form.balance }}</span>
+            </el-form-item>
+          </div>
+          <div class="form-title"><span>消费数据</span></div>
+          <div style="display: flex;">
+            <el-form-item label="下单数(单):">
+              <span style="display: block;min-width: 250px;">{{ form.orderCount }}</span>
+            </el-form-item>
+            <el-form-item label="支付成功数(单):">
+              <span style="display: block;min-width: 250px;">{{ form.buyCount }}</span>
+            </el-form-item>
+          </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,
+ } from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_memberInformation_sex','tourism_memberInformation_user_type'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '', // 新增地址
+        details: '/member/memberInfo/detail', // 详情地址
+        edit: '', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {},
+      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,imgUrl:[]})
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row,
+          imgUrl: row.imgUrl?row.imgUrl.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,
+            imgUrl: res.data.imgUrl?res.data.imgUrl.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}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = 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>

+ 535 - 0
src/views/tourism/marketingActivities/formBox/templateManagementForm.vue

@@ -0,0 +1,535 @@
+<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-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="模板配置:" name="first"></el-tab-pane>
+        </el-tabs>
+        <div style="display: flex;">
+          <div></div>
+          <div>
+            <el-form :model="form" ref="form" :rules="rules" label-width="120px">
+              <div>
+                  <el-form-item label="模板名称:" prop="activityName">
+                    <el-input style="width: 350px;" v-model="form.activityName" placeholder="请输入模板名称" maxlength="50" show-word-limit />
+                  </el-form-item>
+                  <el-form-item label="页面路径:" prop="activityName">
+                    <el-input style="width: 350px;" v-model="form.activityName" placeholder="请输入页面路径" maxlength="50" show-word-limit />
+                  </el-form-item>
+                  <el-form-item label="背景图1" prop="image">
+                    <div style="display: flex;">
+                      <div 
+                      v-for="(item,index) in form.image" 
+                      :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.image">
+                        </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.image||form.image.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>建议尺寸375px X 392px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                  </el-form-item>
+                  <el-form-item label="背景图1" prop="image">
+                    <div style="display: flex;">
+                      <div 
+                      v-for="(item,index) in form.image" 
+                      :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.image">
+                        </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.image||form.image.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>建议尺寸375px X 392px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+                  </el-form-item>
+                  <el-form-item label="产品区域背景色值:" prop="eventTime">
+                    <el-color-picker v-model="form.productBg"></el-color-picker>
+                  </el-form-item>
+              </div>
+            </el-form>
+          </div>
+        </div>
+        
+      </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'
+import selectCouponManagement from '../model/selectCouponManagement.vue'
+import selectTicketOrders from "../model/selectTicketOrders.vue"
+export default {
+  name: "addAndEdit",
+  components: {selectCouponManagement,selectTicketOrders},
+  dicts: ['tourism_couponManagement_type','tourism_couponManagement_useUserType','tourism_couponManagement_receiveType','tourism_couponManagement_useConfig','goods_type'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        list: '/merchant/merchantTemplate/pageList', // 列表地址
+        add: '/merchant/merchantTemplate/insertOrUpdate', // 新增地址
+        details: '/merchant/merchantTemplate/selectById', // 详情地址
+        edit: '/merchant/merchantTemplate/insertOrUpdate', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {
+        activityName: [{ required: true, message: "请输入活动名称", trigger: ["change","blur"] }],
+        image: [{ required: true, message: "请上传封面", trigger: ["change","blur"] }],
+        eventTime: [{ required: true, message: "请选择活动起止时间", trigger: ["change","blur"] }],
+        jsonObj: [{ required: true, message: "请选择模板", trigger: ["change","blur"] }],
+        useUserRelid_2: [{ required: true, message: "请选择优惠券", trigger: ["change","blur"] }],
+        useUserRelid_3: [{ required: true, message: "请选择景区门票", trigger: ["change","blur"] }],
+      },
+
+      activeName: 'first',
+
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
+
+      jsonObjList: []
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.activeName = 'first'
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.model = model
+      this.formStatus = 0
+      this.getJsonObjList()
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{
+          ...row,
+          eventTime: [], // 活动时间段
+          image: [],
+          useUserRelid_2: [],
+          useUserRelid_3: [],
+        })
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row,
+          image: row.image?row.image.split(','):[],
+        }
+        this.$set(this,'form',{
+          memberId: row.id
+        })
+        this.formStatus = 1
+      }else if(model=='EDITInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.radioInputs(this.form.useType)
+      this.radioInput(this.form.receiveType)
+      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,
+            eventTime: [res.data.startDate,res.data.endDate], // 发放时间段
+            image: res.data.image?res.data.image.split(','):[],
+            useUserRelid_3: [],
+            useUserRelid_2: []
+          }
+          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;
+      }
+    },
+    /** 查询模板列表 */
+    async getJsonObjList() {
+      try {
+        let res = await listTableApi(this.configUrl.list,{
+          pageNum: 1,
+          pageSize: 999
+        })
+        if(res.code == 200) {
+          this.jsonObjList = res.data.rows;
+        }
+      } catch (error) {
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate((valid ,object)=> {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          let param = JSON.parse(JSON.stringify(this.form))
+          param['startDate'] = param.eventTime[0]
+          param['endDate'] = param.eventTime[1]
+
+          delete param.eventTime
+          delete param.useUserRelid_2
+          delete param.useUserRelid_3
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                ...param,
+                image: param.image ? param.image.join(','):'',
+              }).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("修改失败!!!");
+              this.loading = false
+            })
+          } else {
+            addTableApi(this.configUrl.edit,{
+                ...param,
+                image: param.image ? param.image.join(','):'',
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              this.loading = false
+            })
+          }
+        }else {
+          console.log("fsdfsd===",valid,object)
+          if(object&&JSON.stringify(object)!='{}') {
+            let srt = ''
+            for(let key in object) {
+              if(object.hasOwnProperty(key)) {
+                srt = srt + `[${object[key][0].message}],`
+              }
+            }
+            this.$message.error(srt);
+          }
+          
+        }
+      });
+    },
+    /**
+     * 重置
+     * @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;
+    },
+    /**  点击tab  */
+    handleClick() {
+
+    },
+    /**  上传图片 单张  */
+    handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.imag.push(response.data.url)
+      }
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 1;
+      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('上传图片图片大小不能超过 1MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.imag.splice(index,1)
+    },
+  },
+};
+</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>

+ 521 - 0
src/views/tourism/marketingActivities/model/selectMoreBox.vue

@@ -0,0 +1,521 @@
+<template>
+    <div class="select-more-box">
+        
+        <div class="select-more-item">
+            <div class="c_left_tag" v-if="modalDetails.length>0">
+                <el-tag class="tag" size="closable" v-for="(item, index) in modalDetails" :key="index"
+                    @close="handleCloseCopy(item)" closable>
+                    {{ item.name }}
+                    </el-tag>
+            </div>
+            <span style="color: #c0c0c0;" v-else>{{ placeholder }}</span>
+            <div class="select-more-tool" v-if="isAdd">
+                <span>目前已选择:{{ modalDetails.length }}个</span>
+                <div class="select-more-but-add" @click="dialogVisible = true"><span>添加</span><span>+</span></div>
+                <div class="select-more-but-clear" @click="clearModalDetails"><span>清除已选</span></div>
+            </div>
+        </div>
+        <el-dialog 
+        append-to-body 
+        :title="title" 
+        :visible.sync="dialogVisible" 
+        @open="dialogOpen" 
+        @close="dialogClose"
+        :close-on-click-modal="false"
+        :destroy-on-close="true" 
+        width="900px" 
+        class="information-dialog"
+        custom-class="template-con-dialog" top="auto">
+            <div class="form-con" v-loading="loading">
+                <div class="form_content">
+                    <!-- left -->
+                    <div class="c_left">
+                        <div class="c_left_btn">
+                            <div>已选成员</div>
+                            <el-button type="text" @click="clearUser">清空</el-button>
+                        </div>
+                        <div class="c_left_tag">
+                            <el-tag class="tag" size="closable" v-for="(item, index) in nameList" :key="index"
+                                @close="handleClose(item)" closable>
+                                {{ item.name }}
+                            </el-tag>
+                        </div>
+                    </div>
+                    <!-- right -->
+                    <div class="c_right">
+                        <div class="c_input">
+                            <el-input size="mini" prefix-icon="el-icon-search" v-model="userValue" placeholder="输入搜索"></el-input>
+                            <el-button style="margin-left: 10px;" size="mini" @click="searchFun(false)">
+                                重置
+                            </el-button>
+                            <el-button size="mini" @click="searchFun(true)" type="primary">
+                                搜索
+                            </el-button>
+                        </div>
+                        <div class="c_checkbox" v-loading="listLoading">
+                            <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
+                                @change="handleCheckAllChange">全选当前页</el-checkbox>
+                           <div style="margin: 15px 0;"></div>
+                            <div class="c_checkbox_item" v-for="(item, index) in dataList" :key="index">
+                                <el-checkbox 
+                                class="checkBox_item" 
+                                v-model="item.checked"
+                                @change="(val)=>changeCheckbox(item,index,val)"
+                                    :key="index">{{
+                                        item.name
+                                    }}</el-checkbox>
+                            </div>
+                            
+                        </div>
+                        <div class="c_pagination">
+                            <el-pagination
+                            v-if="!listLoading"
+                            small
+                            background
+                            layout="total, prev, pager, next"
+                            :page-sizes="page.pageSizes"
+                            :page-size="page.pageSize"
+                            :total="page.total"
+                            :current-page="page.pageNum"
+                            @size-change="handleSizeChange"
+                            @current-change="handleCurrentChange"
+                            >
+                            </el-pagination>
+                        </div>
+                    </div>
+                </div>
+    
+                <div class="drawer-footer">
+                    <el-button @click="dialogVisible = false">
+                        取消
+                    </el-button>
+                    <el-button @click="submitForm()" type="primary">
+                        确定
+                    </el-button>
+                </div>
+            </div>
+        </el-dialog>
+    </div>
+    
+</template>
+  
+<script>
+import { 
+    listTableApi, 
+  } from "@/api/CURD";
+export default {
+    props: {
+        title: {
+            type: String,
+            default: '新增',
+        },
+        value: {
+            type: Array,
+            default: ()=>{
+                return []
+            },
+        },
+        idKey: { // 绑定的iD
+            type: String,
+            default: 'id',
+        },
+        nameKey: { // 展示的字段名称
+            type: String,
+            default: 'name',
+        },
+        isAdd: { // 是否展示新增
+            type: Boolean,
+            default: true,
+        },
+        selectKey: { // 查询参数
+            type: String,
+            default: 'name',
+        },
+        pageSizeKey: { // 分页参数
+            type: String,
+            default: 'pageSize',
+        },
+        pageNumKey: { // 分页参数
+            type: String,
+            default: 'pageNum',
+        },
+        listUrl: { // 列表查询接口地址
+            type: String,
+            default: '',
+        },
+        params: { // 默认条件
+            type: Object,
+            default: ()=>{
+                return {}
+            },
+        },
+        limit: { // 限制选择的条数
+            type: Number,
+            default: -1, // -1 表示不限
+        },
+        placeholder: {
+            type: String,
+            default: '请点击添加',
+        }
+    },
+    data() {
+        return {
+            dialogVisible: false, //弹窗选择
+            userValue: '', //人员搜索
+            dataList: [], //数据列表集合
+            nameList: [],//已选择人员
+            checkAll: false,
+            checkedUsers: [], // 选中的
+            isIndeterminate: false,
+            modalDetails: [],
+            loading: false,// 
+            page: {
+                pageSizes: [100, 200, 300, 400],
+                pageSize: 10,
+                pageNum: 1,
+                total: 0,
+            },
+            listLoading: false,
+        }
+    },
+    watch: {
+        value: {
+            handler(newValue){
+                console.log("dfsdsfsdf====",this.value)
+                if(this.value) {
+                    this.modalDetails = JSON.parse(JSON.stringify(this.value))
+                }else {
+                    this.modalDetails = []
+                }
+            },
+            immediate: true
+        }
+    },
+    methods: {
+        // 弹窗组件显示事件
+        async dialogOpen() {
+            this.loading = true
+            this.listLoading = false
+            this.userValue = ''
+            this.$set(this.page,'pageNum',1)
+            if (this.modalDetails.length) {
+                this.modalDetails.forEach((item) => {
+                    this.checkedUsers.push(item.id)
+                })
+                this.nameList = this.modalDetails//已选择人员
+                this.checkAll = false
+                this.isIndeterminate = false
+                this.userValue = '' //人员搜索
+            } else {
+                this.nameList = []//已选择人员
+                this.checkAll = false
+                this.checkedUsers = [] // 选中的
+                this.isIndeterminate = false
+                this.userValue = '' //人员搜索
+            }
+            await this.listUser()
+            this.loading = false
+        },
+        /**  搜索   */
+        searchFun(type) {
+            this.listLoading = true
+            if(!type) {
+                this.userValue = ''
+            }
+            this.listUser()
+        },
+        // 查询支部人员集合
+        async listUser() {
+            try {
+                this.dataList = []
+                let res = await listTableApi(this.listUrl,{
+                    ...this.params,
+                    [this.selectKey]: this.userValue,
+                    [this.pageNumKey]: this.page.pageNum,
+                    [this.pageSizeKey]: this.page.pageSize
+                })
+                if (res.code == 200) {
+                    let list = []
+                    let listId = []
+                    this.nameList.forEach((item1,index1)=>{
+                        listId.push(item1.id)
+                    })
+                    res.data.rows.forEach((item,index)=>{
+                        list.push({
+                            ...item,
+                            id: item[this.idKey],
+                            name: item[this.nameKey],
+                            checked: listId.includes(item[this.idKey])
+                        })
+                    })
+                    this.dataList = list
+                    this.$set(this.page,'total',res.data.total)
+                } else {
+                    this.$message({
+                        type: 'error',
+                        message: res.msg
+                    });
+                }
+                this.checkedCurrentPageAll()
+                this.listLoading = false
+            } catch (error) {
+                this.checkedCurrentPageAll()
+                this.loading = false
+                this.listLoading = false
+                this.dialogVisible = false
+            }
+        },
+        // 清空按钮
+        clearUser() {
+            this.handleCheckAllChange(false)
+            this.isIndeterminate = false;
+            this.checkAll = false
+        },
+        // 清除全部
+        clearModalDetails() {
+            this.$emit('input', [])
+            this.$emit('submitForm')
+        },
+        // 单项删除已选按钮 (外部)
+        handleCloseCopy(item) {
+            let arr = this.modalDetails.filter((item1) => {
+                return item.id != item1.id
+            })
+            this.$emit('input', arr)
+            this.$emit('submitForm')
+        },
+        // 单项删除已选按钮 (备选)
+        handleClose(item) {
+            let arr = this.nameList.filter((item1) => {
+                return item.id != item1.id
+            })
+            let listId = []
+            arr.forEach((item,index) => {
+                listId.push(item.id)
+            })
+            let list = JSON.parse(JSON.stringify(this.dataList))
+            list.forEach((item,index) => {
+                list[index].checked = listId.includes(item.id)
+            })
+            this.nameList = arr
+            this.dataList = list
+            this.checkedCurrentPageAll()
+        },
+        // 全选当前页按钮
+        handleCheckAllChange(val) {
+            // if(this.limit != -1 ) {
+            //     if(this.dataList.length)
+            // }
+
+            let list = JSON.parse(JSON.stringify(this.dataList))
+            let listId = []
+            list.forEach((item,index) => {
+                list[index].checked = val
+                listId.push(item.id)
+            })
+            let listExist = this.nameList.filter((item,index)=>{
+                return !listId.includes(item.id)
+            })
+            list.forEach((item,index) => {
+                if(item.checked) {
+                    listExist.push({
+                        ...item
+                    })
+                } 
+            })
+            this.dataList = list
+            this.nameList = listExist
+            this.isIndeterminate = false;
+        },
+        /** 检测当前页是否全选  */
+        checkedCurrentPageAll() {
+            let length = 0
+            let list = JSON.parse(JSON.stringify(this.dataList))
+            list.forEach((item,index) => {
+                if(item.checked) {
+                    length++
+                }
+            })
+            this.checkAll = (length == list.length)&& length != 0
+        },
+        // 弹窗组件关闭事件
+        dialogClose() {
+        },
+        // 提交表单事件
+        submitForm() {
+            this.$emit('input', JSON.parse(JSON.stringify(this.nameList)))
+            this.$emit('submitForm')
+            this.dialogVisible = false
+        },
+        /** 调整每页选择条数  */
+        handleSizeChange(val) {
+        },
+        /** 点击页码  */
+        handleCurrentChange(val) {
+            this.listLoading = true
+            this.listUser()
+        },
+        /** 选择列表  */
+        changeCheckbox(item,index,val) {
+            if(val){
+                this.nameList.push({
+                    ...item
+                })
+            }else {
+                let i = -1
+                this.nameList.forEach((item1,index)=>{
+                    if(item1.id == item.id) {
+                        i = index
+                    }
+                })
+                if(i!=-1) {
+                    this.nameList.splice(i,1)
+                }
+            }
+            this.checkedCurrentPageAll()
+        }
+ 
+    },
+}
+</script>
+  
+<style lang="scss" scoped>
+.is-error {
+    .select-more-item {
+        border-color: #f56c6c !important;
+    }
+}
+.select-more-tool {
+    position: absolute;
+    bottom: 5px;
+    right: 5px;
+    display: flex;
+    .select-more-but-add {
+        width: 80px;
+        height: 36px;
+        box-sizing: border-box;
+        color: #fff;
+        background-color: #409eff;
+        border-color: #409eff;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-radius: 5px;
+        cursor: pointer;
+        margin-left: 10px;
+        
+    }
+    .select-more-but-clear {
+        width: 80px;
+        height: 36px;
+        box-sizing: border-box;
+        color: #fff;
+        background-color: #f56c6c;
+        border-color: #f56c6c;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        border-radius: 5px;
+        cursor: pointer;
+        margin-left: 10px;
+    }
+}
+
+.select-more-item {
+    width: 100%;
+    height: 150px;
+    border: 1px solid #C0C4CC;
+    overflow: hidden;
+    overflow-y: auto;
+    border-radius: 5px;
+    margin-top: 5px;
+    position: relative;
+    padding: 10px;
+    .c_left_tag {
+        display: flex;
+        flex-wrap: wrap;
+    }
+ 
+            .tag {
+                margin-left: 0 !important;
+                margin-right: 10px;
+                margin-bottom: 10px;
+            }
+}
+.form-con {
+    padding-top: 10px;
+    margin: auto;
+ 
+    .form_content {
+        height: 500px;
+        display: flex;
+ 
+        .c_left {
+            width: 50%;
+            border-right: 1px solid #EBEEF5;
+            padding: 0 10px;
+ 
+            .c_left_btn {
+                height: 32px;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+            }
+ 
+            .c_left_tag {
+                margin-top: 10px;
+                display: flex;
+                flex-wrap: wrap;
+            }
+ 
+            .tag {
+                margin-left: 0 !important;
+                margin-right: 10px;
+                margin-bottom: 10px;
+            }
+ 
+        }
+ 
+        .c_right {
+            width: 50%;
+            height: 100%;
+            padding: 0 10px;
+            display: flex;
+            flex-direction: column;
+            justify-content: space-between;
+            box-sizing: border-box;
+            .c_input {
+                height: 32px;
+                flex-shrink: 0;
+                display: flex;
+                align-items: center;
+            }
+            .c_checkbox {
+                margin-top: 10px;
+                height: 100%;
+                .c_checkbox_item {
+                    width: 100%;
+                    margin-bottom: 5px;
+                }
+            }
+ 
+            .checkBox {
+                display: flex;
+                flex-direction: column;
+                
+                .checkBox_item {
+                    height: 30px;
+                    display: flex;
+                    align-items: center;
+                }
+            }
+            .c_pagination {
+                height: 32px;
+                flex-shrink: 0;
+                display: flex;
+                justify-content: center;
+            }
+        }
+    }
+}
+</style>

+ 254 - 0
src/views/tourism/marketingActivities/templateManagement.vue

@@ -0,0 +1,254 @@
+<template>
+    <div class="app-container">
+      <el-row :gutter="20">
+        <!--用户数据-->
+        <el-col :span="24" :xs="24">
+          <el-form v-if="false" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+            <el-form-item label="活动名称" prop="activityName">
+              <el-input
+                v-model="queryParams.activityName"
+                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="appletPath" prop="appletPath" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[2].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-delete"
+                  @click="handleDelete(scope.row)"
+                  v-hasPermi="configPermi.delect"
+                >删除</el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleUpdate(scope.row)"
+                  v-hasPermi="configPermi.edit"
+                >修改</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>
+      <!--  详情 -->
+      <detailsBox ref="detailsBox" />
+      <addAndEdit ref="addAndEdit" @refresh="getList" />
+    </div>
+  </template>
+  
+  <script>
+  import { 
+    listTableApi, 
+    delTableParamsApi,
+    addTableApi
+  } from "@/api/CURD";
+  import detailsBox from "./detailsBox/templateManagementDetails.vue"
+  import addAndEdit from "./formBox/templateManagementForm.vue"
+  export default {
+    name: "User",
+    dicts: ['tourism_eventManagement_status'],
+    components: {detailsBox,addAndEdit},
+    data() {
+      return {
+        title: "优惠券管理",// 通用标题
+        configPermi: {
+          add: [''], // 新增权限
+          details: ['electronicMembership:memberInformation:details'], // 详情权限
+          delect: ['electronicMembership:memberInformation:delect'], // 删除权限
+          edit: [''], // 编辑权限
+          upload: [''],// 导入权限
+          export: [''],// 导出权限
+        },
+        configUrl: {
+          list: '/merchant/merchantTemplate/pageList', // 列表地址
+          delect: '/merchant/merchantActivityInfo/deleteById', // 删除地址
+          upload: '',// 导入地址
+          download:'', // 下载模板地址
+          export: '',// 导出地址
+          updateStatus: '', // 编辑地址
+        },
+        // 遮罩层
+        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 }
+        ],
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      /** 查询用户列表 */
+      getList() {
+        this.loading = true;
+        listTableApi(
+          this.configUrl.list,
+          this.addDateRange(
+            this.queryParams, 
+            this.dateRange)).then(response => {
+              this.tableList = response.data.rows;
+              this.total = response.data.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;
+        return
+        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) {
+        console.log("row======",row)
+        return
+        this.$modal.confirm(`是否确认${row.status == 0 ? '启用' : '禁用'} ${row.realName||''}吗?`).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)
+        });
+      },
+    }
+  };
+  </script>
+  

+ 2 - 2
src/views/tourism/membershipManagement/electronicMembership/formBox/membershipLevelForm.vue

@@ -67,7 +67,7 @@
               </div>
               
             </div>
-            <span>建议尺寸XXX*XXX,支持jpg、png,支持100KB大小以内的图片上传</span>
+            <span>建议尺寸16px X 16px,支持jpg、png,支持100KB大小以内的图片上传</span>
           </el-form-item>
           <div class="form-title"><span>会员权益</span></div>
           <el-form-item label="折扣权益:">
@@ -308,7 +308,7 @@ export default {
       }
     },
     beforeAvatarUpload(file) {
-      const isLt2M = file.size / 1024 / 1024 < 1;
+      const isLt2M = file.size / 1024 / 1024 <= 0.1;
       let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
       let typeList = ['png','jepg','jpg']
       const isJPG = typeList.includes(testmsg);

+ 1 - 1
src/views/tourism/membershipManagement/electronicMembership/membershipLevel.vue

@@ -48,7 +48,7 @@
                 <span v-else>暂无图片</span>
                 </template>
             </el-table-column>
-            <el-table-column label="享受折扣" align="center" key="discount" prop="discount" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="享受折扣(%)" align="center" key="discount" prop="discount" v-if="columns[3].visible" :show-overflow-tooltip="true" />
             <el-table-column label="专属优惠卷" align="center" key="couponNames" prop="couponNames" v-if="columns[4].visible" :show-overflow-tooltip="true" />
             <el-table-column
               label="操作"

+ 1 - 1
src/views/tourism/scenicAreaManagement/contentManagement/attractionInfoManagement.vue

@@ -80,7 +80,7 @@
                  />
               </template>
             </el-table-column>
-            <el-table-column label="景点产品" align="center" key="goodId" prop="goodId" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <!-- <el-table-column label="景点产品" align="center" key="goodId" prop="goodId" v-if="columns[3].visible" :show-overflow-tooltip="true" /> -->
             <el-table-column
               label="操作"
               align="center"

+ 2 - 2
src/views/tourism/scenicAreaManagement/contentManagement/formBox/attractionInfoManagementForm.vue

@@ -77,7 +77,7 @@
               placeholder="选择开/闭园时间范围">
             </el-time-picker>
           </el-form-item>
-          <el-form-item label="景点产品:" prop="goodId">
+          <!-- <el-form-item label="景点产品:" prop="goodId">
             <el-select v-model="form.goodId" clearable placeholder="请选择景点产品">
               <el-option
                 v-for="item in scenicAreaProducts"
@@ -86,7 +86,7 @@
                 :value="item.value">
               </el-option>
             </el-select>
-          </el-form-item>
+          </el-form-item> -->
           <el-form-item label="开/闭园:" prop="status">
             <el-switch
                 style="display: block;margin-top: 8px;"

+ 1 - 1
src/views/tourism/scenicAreaManagement/contentManagement/formBox/tourismStrategyForm.vue

@@ -50,7 +50,7 @@
                 <i v-else class="el-icon-plus avatar-uploader-icon"></i>
               </el-upload>
             </div>
-            <span>建议上传120x100,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
+            <span>建议上传120px X 100px,支持jpg/png/gif,支持1MB大小以内的图片上传</span>
           </el-form-item>
           <div class="form-title"><span>内容详情</span></div>
           <el-form-item label-width="0" label="" prop="detail">

+ 38 - 38
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/pointTypeForm.vue

@@ -42,7 +42,7 @@
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
             </el-upload>
           </div>
-          <span>建议尺寸40*40,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+          <span>建议尺寸40px X 40px,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
         </el-form-item>
         <el-form-item label="点位图标" prop="iconPath">
           <div
@@ -70,7 +70,7 @@
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
             </el-upload>
           </div>
-          <span>建议尺寸40*40,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+          <span>建议尺寸40px X 40px,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
         </el-form-item>
       </el-form>
     </div>
@@ -288,24 +288,24 @@ export default {
         this.$message.error('上传图片图片大小不能超过 2MB!');
       }
 
-      let isSize = new Promise(function (resolve, reject) {
-          let _URL = window.URL || window.webkitURL;
-          let img = new Image();
-          img.onload = function () {
-            let valid = img.width == 40 && img.height == 40;
-            valid ? resolve() : reject();
-          };
-          img.src = _URL.createObjectURL(file);
-        }).then(
-          () => {
-            return file;
-          },
-          () => {
-            this.$message.error("上传图片尺寸只能是 40*40 px !");
-            return Promise.reject();
-          }
-        );
-      return isJPG && isLt2M && isSize;
+      // let isSize = new Promise(function (resolve, reject) {
+      //     let _URL = window.URL || window.webkitURL;
+      //     let img = new Image();
+      //     img.onload = function () {
+      //       let valid = img.width == 40 && img.height == 40;
+      //       valid ? resolve() : reject();
+      //     };
+      //     img.src = _URL.createObjectURL(file);
+      //   }).then(
+      //     () => {
+      //       return file;
+      //     },
+      //     () => {
+      //       this.$message.error("上传图片尺寸只能是 40*40 px !");
+      //       return Promise.reject();
+      //     }
+      //   );
+      return isJPG && isLt2M;
     },
     handleAvatarProgress(){
       this.actionUrlLoading = true
@@ -337,24 +337,24 @@ export default {
         this.$message.error('上传图片图片大小不能超过 2MB!');
       }
 
-      let isSize = new Promise(function (resolve, reject) {
-          let _URL = window.URL || window.webkitURL;
-          let img = new Image();
-          img.onload = function () {
-            let valid = img.width == 40 && img.height == 40;
-            valid ? resolve() : reject();
-          };
-          img.src = _URL.createObjectURL(file);
-        }).then(
-          () => {
-            return file;
-          },
-          () => {
-            this.$message.error("上传图片尺寸只能是 40*40 px !");
-            return Promise.reject();
-          }
-        );
-      return isJPG && isLt2M && isSize;
+      // let isSize = new Promise(function (resolve, reject) {
+      //     let _URL = window.URL || window.webkitURL;
+      //     let img = new Image();
+      //     img.onload = function () {
+      //       let valid = img.width == 40 && img.height == 40;
+      //       valid ? resolve() : reject();
+      //     };
+      //     img.src = _URL.createObjectURL(file);
+      //   }).then(
+      //     () => {
+      //       return file;
+      //     },
+      //     () => {
+      //       this.$message.error("上传图片尺寸只能是 40*40 px !");
+      //       return Promise.reject();
+      //     }
+      //   );
+      return isJPG && isLt2M;
     },
     handleAvatarProgress1(){
       this.actionUrlLoading1 = true

+ 34 - 21
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/scenicGuideForm.vue

@@ -70,7 +70,7 @@
               </div>
               
             </div>
-            <span>建议尺寸40*40,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+            <span>建议尺寸40px X 40px,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
           </el-form-item>
         <el-form-item label="点位信息:">
           <el-input :rows="4"  v-model="form.remark" type="textarea" placeholder="请输入点位信息" maxlength="500" show-word-limit />
@@ -78,11 +78,12 @@
         <el-form-item label="地图定位:">
           <div style="display: flex;">
             <el-form-item label="经度:" label-width="80px" prop="longitude">
-              <el-input style="width: 350px;" readonly v-model="form.longitude" placeholder="请输入经度" />
+              <el-input style="width: 350px;" v-model="form.longitude" placeholder="请输入经度" />
             </el-form-item>
             <el-form-item label="纬度:" prop="latitude">
-              <el-input style="width: 350px;" readonly v-model="form.latitude" placeholder="请输入纬度" />
+              <el-input style="width: 350px;" v-model="form.latitude" placeholder="请输入纬度" />
             </el-form-item>
+            <el-button type="primary" @click="findLocation" style="margin-left: 10px;">查找位置</el-button>
           </div>
         </el-form-item>
         <!-- 腾讯地图  -->
@@ -348,30 +349,42 @@ export default {
         this.$message.error('上传图片图片大小不能超过 1MB!');
       }
 
-      let isSize = new Promise(function (resolve, reject) {
-          let _URL = window.URL || window.webkitURL;
-          let img = new Image();
-          img.onload = function () {
-            let valid = img.width == 40 && img.height == 40;
-            valid ? resolve() : reject();
-          };
-          img.src = _URL.createObjectURL(file);
-        }).then(
-          () => {
-            return file;
-          },
-          () => {
-            this.$message.error("上传图片尺寸只能是 40*40 px !");
-            return Promise.reject();
-          }
-        );
-      return isJPG && isLt2M && isSize;
+      // let isSize = new Promise(function (resolve, reject) {
+      //     let _URL = window.URL || window.webkitURL;
+      //     let img = new Image();
+      //     img.onload = function () {
+      //       let valid = img.width == 40 && img.height == 40;
+      //       valid ? resolve() : reject();
+      //     };
+      //     img.src = _URL.createObjectURL(file);
+      //   }).then(
+      //     () => {
+      //       return file;
+      //     },
+      //     () => {
+      //       this.$message.error("上传图片尺寸只能是 40*40 px !");
+      //       return Promise.reject();
+      //     }
+      //   );
+      return isJPG && isLt2M ;
     },
     handleAvatarProgress(){
       this.actionUrlLoading = true
     },
     handleAvatarError() {
       this.actionUrlLoading = false
+    },
+    /** 查找位置  */
+    findLocation() {
+      if(this.form.longitude&&this.form.latitude){
+        this.$refs.qqMapBox.setMakerLayer({
+          height: 0,
+          lat: this.form.latitude,
+          lng: this.form.longitude,
+        },true)
+      }else {
+        this.$message.error('请输入经纬度!!!');
+      }
     }
   },
 };

+ 1 - 1
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/scenicGuideImageForm.vue

@@ -66,7 +66,7 @@
         </el-form-item>
         <el-form-item label="可见级别" >
           <div style="display: flex;">
-            <el-form-item label="最小" prop="minNum">
+            <el-form-item label="最小" prop="minNum" label-width="180">
               <el-input style="width: 350px;" v-model="form.minNum" placeholder="请输入最小可见级别" />
             </el-form-item>
             <el-form-item label="最大" prop="maxNum">