소스 검색

1. 完成

MONSTER-ygh 1 년 전
부모
커밋
ac5372f95a

+ 305 - 0
src/views/tourism/financialManagement/balanceChangeDetails.vue

@@ -0,0 +1,305 @@
+<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="用户名">
+                <el-input
+                v-model="queryParams.memberName"
+                placeholder="请输入用户名"
+                clearable
+                style="width: 240px;"
+                @keyup.enter.native="handleQuery"
+                />
+            </el-form-item>
+            <el-form-item label="会员号">
+                <el-input
+                v-model="queryParams.memberCode"
+                placeholder="请输入会员号"
+                clearable
+                style="width: 240px;"
+                @keyup.enter.native="handleQuery"
+                />
+            </el-form-item>
+            <el-form-item label="渠道" prop="source">
+                <el-select v-model="queryParams.source" clearable placeholder="请选择渠道">
+                <el-option
+                    v-for="dict in dict.type.credit_source"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value">
+                </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="变动类型" prop="type">
+                <el-select v-model="queryParams.type" clearable placeholder="请选择变动类型">
+                  <el-option
+                      v-for="dict in dict.type.tourism_memberInformation_biangeng_type"
+                      :key="dict.value"
+                      :label="dict.label"
+                      :value="dict.value">
+                  </el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="变动时间" prop="time">
+                <el-date-picker
+                v-model="queryParams.time"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                end-placeholder="结束日期">
+                </el-date-picker>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+  
+          <el-row :gutter="10" class="mb8">
+            <el-col :span="1.5">
+              <el-button
+                type="warning"
+                plain
+                icon="el-icon-download"
+                size="mini"
+                @click="handleExport"
+                v-hasPermi="configPermi.export"
+              >导出</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="memberName" prop="memberName" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="会员号" align="center" key="memberCode" prop="memberCode" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="卡类型" align="center" key="cardType" prop="cardType" v-if="columns[2].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_IntegralRecord_cardType" :value="scope.row.cardType"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="手机号" align="center" key="memberMobile" prop="memberMobile" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="渠道" align="center" key="source" prop="source" v-if="columns[4].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.credit_source" :value="scope.row.source"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="变动类型" align="center" key="type" prop="type" v-if="columns[5].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_memberInformation_biangeng_type" :value="scope.row.type"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="变动量" align="center" key="num" prop="num" v-if="columns[6].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="变动原因" align="center" key="remark" prop="remark" v-if="columns[7].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="剩余余额" align="center" key="total" prop="total" v-if="columns[8].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="变动时间" align="center" key="createTime" prop="createTime" v-if="columns[9].visible" :show-overflow-tooltip="true" />
+          </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" @refresh="getList" />
+    </div>
+  </template>
+  
+  <script>
+  import { 
+    listTableApi, 
+    delTableParamsApi, 
+    updateTableApi
+  } from "@/api/CURD";
+  import detailsBox from "./detailsBox/ticketRefundOrderDetails.vue"
+  export default {
+    name: "User",
+    dicts: ['credit_source','tourism_memberInformation_biangeng_type','tourism_IntegralRecord_cardType'],
+    components: {detailsBox},
+    data() {
+      return {
+        title: "门票退款管理",// 通用标题
+        configPermi: {
+          add: ['system:user:edit'], // 新增权限
+          details: ['system:user:details'], // 详情权限
+          delect: ['system:user:remove'], // 删除权限
+          edit: ['system:user:edit'], // 编辑权限
+          upload: ['system:user:upload'],// 导入权限
+          export: ['system:user:export'],// 导出权限
+        },
+        configUrl: {
+          list: '/member/memberBalanceRecord/list', // 列表地址
+          delect: '', // 删除地址
+          upload: '',// 导入地址
+          download:'', // 下载模板地址
+          export: '',// 导出地址
+          edit: '', // 编辑地址
+        },
+        // 遮罩层
+        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: 4, label: `渠道`, visible: true },
+          { key: 5, label: `变动类型`, visible: true },
+          { key: 6, label: `变动量`, visible: true },
+          { key: 7, label: `变动原因`, visible: true },
+          { key: 8, label: `剩余余额`, visible: true },
+          { key: 9, label: `变动时间`, visible: true },
+        ],
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      /** 查询用户列表 */
+      getList() {
+        this.loading = true;
+        let params = JSON.parse(JSON.stringify({
+            ...this.queryParams,
+            createBeginTime: this.queryParams.time&&this.queryParams.time[0]?this.queryParams.time[0]:null,
+            createEndTime: this.queryParams.time&&this.queryParams.time[1]?this.queryParams.time[1]:null,
+        }))
+        delete params.time;
+        listTableApi(
+          this.configUrl.list,
+          this.addDateRange(
+            params,
+            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 + '详情',"DEATILS", 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() {
+        let params = JSON.parse(JSON.stringify({
+            ...this.queryParams,
+            createBeginTime: this.queryParams.time&&this.queryParams.time[0]?this.queryParams.time[0]:null,
+            createEndTime: this.queryParams.time&&this.queryParams.time[1]?this.queryParams.time[1]:null,
+        }))
+        delete params.time;
+        this.download(this.configUrl.export, {
+          ...params
+        }, `${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)
+        this.$modal.confirm(`是否确认${row.status == 1 ? '关闭' : '打开'} ${row.titleName}吗?`).then( () => {
+          return updateTableApi(this.configUrl.edit,{
+            ...row,
+            status: row.status == 1 ? 0 : 1
+          });
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess(`${row.status == 1 ? '打开' : '关闭'}成功`);
+        }).catch((e) => {
+          console.error("失败====",e)
+        });
+      },
+    }
+  };
+  </script>
+  

+ 311 - 312
src/views/tourism/financialManagement/ticketRefundOrder.vue

@@ -1,321 +1,320 @@
 <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="退款单号">
-                <el-input
-                v-model="queryParams.refundTransactionId"
-                placeholder="请输入退款单号"
-                clearable
-                style="width: 240px;"
-                @keyup.enter.native="handleQuery"
-                />
-            </el-form-item>
-            <el-form-item label="原订单号">
-                <el-input
-                v-model="queryParams.orderId"
-                placeholder="请输入原订单号"
-                clearable
-                style="width: 240px;"
-                @keyup.enter.native="handleQuery"
-                />
-            </el-form-item>
-            <el-form-item label="手机号码">
-                <el-input
-                v-model="queryParams.refundMobile"
-                placeholder="请输入手机号码"
-                clearable
-                style="width: 240px;"
-                @keyup.enter.native="handleQuery"
-                />
-            </el-form-item>
-            <el-form-item label="添加时间" prop="time">
-                <el-date-picker
-                v-model="queryParams.time"
-                type="datetimerange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                end-placeholder="结束日期">
-                </el-date-picker>
-            </el-form-item>
-            <el-form-item label="退款状态">
-                <el-select
-                v-model="queryParams.status"
-                placeholder="退款状态"
-                clearable
-                style="width: 100%"
-                >
-                <el-option
-                    v-for="dict in dict.type.tourism_orderRefund_status"
-                    :key="dict.value"
-                    :label="dict.label"
-                    :value="dict.value"
-                />
-                </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">
-            <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="orderNum" prop="orderNum" v-if="columns[0].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="退款单号" align="center" key="refundTransactionId" prop="refundTransactionId" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="支付单号" align="center" key="transactionId" prop="transactionId" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="购票人手机号" align="center" key="refundMobile" prop="refundMobile" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="门票名称" align="center" key="performName" prop="performName" v-if="columns[4].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="规格" align="center" key="goodsName" prop="goodsName" v-if="columns[5].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="购票渠道" align="center" key="source" prop="source" v-if="columns[6].visible" :show-overflow-tooltip="true">
-                <template slot-scope="scope">
-                    <dict-tag :options="dict.type.tourism_ticketOrders_source" :value="scope.row.source"/>
-                </template>
-            </el-table-column>
-            <el-table-column label="退款申请时间" align="center" key="refundTime" prop="refundTime" v-if="columns[7].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="退款金额" align="center" key="refundAmount" prop="refundAmount" v-if="columns[8].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="申请原因" align="center" key="refundReason" prop="refundReason" v-if="columns[9].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="退款状态" align="center" key="status" prop="status" v-if="columns[10].visible" :show-overflow-tooltip="true">
-                <template slot-scope="scope">
-                    <dict-tag :options="dict.type.tourism_orderRefund_status" :value="scope.row.status"/>
-                </template>
-            </el-table-column>
-            <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.edit"
-                >详情</el-button>
-                <el-button
+  <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="退款单号">
+              <el-input
+              v-model="queryParams.refundTransactionId"
+              placeholder="请输入退款单号"
+              clearable
+              style="width: 240px;"
+              @keyup.enter.native="handleQuery"
+              />
+          </el-form-item>
+          <el-form-item label="原订单号">
+              <el-input
+              v-model="queryParams.orderId"
+              placeholder="请输入原订单号"
+              clearable
+              style="width: 240px;"
+              @keyup.enter.native="handleQuery"
+              />
+          </el-form-item>
+          <el-form-item label="手机号码">
+              <el-input
+              v-model="queryParams.refundMobile"
+              placeholder="请输入手机号码"
+              clearable
+              style="width: 240px;"
+              @keyup.enter.native="handleQuery"
+              />
+          </el-form-item>
+          <el-form-item label="添加时间" prop="time">
+              <el-date-picker
+              v-model="queryParams.time"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              end-placeholder="结束日期">
+              </el-date-picker>
+          </el-form-item>
+          <el-form-item label="退款状态">
+              <el-select
+              v-model="queryParams.status"
+              placeholder="退款状态"
+              clearable
+              style="width: 100%"
+              >
+              <el-option
+                  v-for="dict in dict.type.tourism_orderRefund_status"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+              />
+              </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">
+          <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="orderNum" prop="orderNum" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="退款单号" align="center" key="refundTransactionId" prop="refundTransactionId" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="支付单号" align="center" key="transactionId" prop="transactionId" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="购票人手机号" align="center" key="refundMobile" prop="refundMobile" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="门票名称" align="center" key="performName" prop="performName" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="规格" align="center" key="goodsName" prop="goodsName" v-if="columns[5].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="购票渠道" align="center" key="source" prop="source" v-if="columns[6].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                  <dict-tag :options="dict.type.tourism_ticketOrders_source" :value="scope.row.source"/>
+              </template>
+          </el-table-column>
+          <el-table-column label="退款申请时间" align="center" key="refundTime" prop="refundTime" v-if="columns[7].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="退款金额" align="center" key="refundAmount" prop="refundAmount" v-if="columns[8].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="申请原因" align="center" key="refundReason" prop="refundReason" v-if="columns[9].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="退款状态" align="center" key="status" prop="status" v-if="columns[10].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                  <dict-tag :options="dict.type.tourism_orderRefund_status" :value="scope.row.status"/>
+              </template>
+          </el-table-column>
+          <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-coordinate"
-                v-if="scope.row.status == 0"
-                @click="refundAuditFun(scope.row,)"
-                v-hasPermi="['refundMr:refundMr:delete']"
-                >审核</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" @refresh="getList" />
-    </div>
-  </template>
-  
-  <script>
-  import { 
-    listTableApi, 
-    delTableParamsApi, 
-    updateTableApi
-  } from "@/api/CURD";
-  import detailsBox from "./detailsBox/ticketRefundOrderDetails.vue"
-  export default {
-    name: "User",
-    dicts: ['tourism_orderRefund_status','tourism_ticketOrders_source'],
-    components: {detailsBox},
-    data() {
-      return {
-        title: "门票退款管理",// 通用标题
-        configPermi: {
-          add: ['system:user:edit'], // 新增权限
-          details: ['system:user:details'], // 详情权限
-          delect: ['system:user:remove'], // 删除权限
-          edit: ['system:user:edit'], // 编辑权限
-          upload: ['system:user:upload'],// 导入权限
-          export: ['system:user:export'],// 导出权限
-        },
-        configUrl: {
-          list: '/order/orderRefund/pageList', // 列表地址
-          delect: '', // 删除地址
-          upload: '',// 导入地址
-          download:'', // 下载模板地址
-          export: '',// 导出地址
-          edit: '/merchant/merchantTourRoute/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 },
-          { key: 3, label: `购票人手机号`, visible: true },
-          { key: 4, label: `门票名称`, visible: true },
-          { key: 5, label: `规格`, visible: true },
-          { key: 6, label: `购票渠道`, visible: true },
-          { key: 7, label: `退款申请时间`, visible: true },
-          { key: 8, label: `退款金额`, visible: true },
-          { key: 9, label: `申请原因`, visible: true },
-          { key: 10, label: `退款状态`, visible: true },
-        ],
-      };
-    },
-    created() {
-      this.getList();
-    },
-    methods: {
-      /** 查询用户列表 */
-      getList() {
-        this.loading = true;
-        let params = JSON.parse(JSON.stringify({
-            ...this.queryParams,
-            refundBeginCreateTime: this.queryParams.time&&this.queryParams.time[0]?this.queryParams.time[0]:null,
-            refundEndCreateTime: this.queryParams.time&&this.queryParams.time[1]?this.queryParams.time[1]:null,
-        }))
-        delete params.time;
-        listTableApi(
-          this.configUrl.list,
-          this.addDateRange(
-            params,
-            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();
+                icon="el-icon-document"
+                @click="handleDetails(scope.row)"
+                v-hasPermi="configPermi.edit"
+              >详情</el-button>
+              <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-coordinate"
+              v-if="scope.row.status == 0"
+              @click="refundAuditFun(scope.row,)"
+              v-hasPermi="['refundMr:refundMr:delete']"
+              >审核</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" @refresh="getList" />
+  </div>
+</template>
+
+<script>
+import { 
+  listTableApi, 
+  delTableParamsApi, 
+  updateTableApi
+} from "@/api/CURD";
+import detailsBox from "./detailsBox/ticketRefundOrderDetails.vue"
+export default {
+  name: "User",
+  dicts: ['tourism_orderRefund_status','tourism_ticketOrders_source'],
+  components: {detailsBox},
+  data() {
+    return {
+      title: "门票退款管理",// 通用标题
+      configPermi: {
+        add: ['system:user:edit'], // 新增权限
+        details: ['system:user:details'], // 详情权限
+        delect: ['system:user:remove'], // 删除权限
+        edit: ['system:user:edit'], // 编辑权限
+        upload: ['system:user:upload'],// 导入权限
+        export: ['system:user:export'],// 导出权限
       },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id);
-        this.single = selection.length != 1;
-        this.multiple = !selection.length;
+      configUrl: {
+        list: '/order/orderRefund/pageList', // 列表地址
+        delect: '', // 删除地址
+        upload: '',// 导入地址
+        download:'', // 下载模板地址
+        export: '',// 导出地址
+        edit: '/merchant/merchantTourRoute/updateStatus', // 编辑地址
       },
-      /** 新增按钮操作 */
-      handleAdd() {
-        if(this.$refs.addAndEdit) {
-          this.$refs.addAndEdit.initData(this.title + '新增', "ADD",{})
-        }
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      tableList: null,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
       },
-      /** 修改按钮操作 */
-      handleUpdate(row) {
-        if(this.$refs.addAndEdit) {
-          this.$refs.addAndEdit.initData(this.title + '编辑', "EDITInit",{...row})
+      dateRange: [],
+      // 控制列表是否显示
+      columns: [
+        { key: 0, label: `订单号`, visible: true },
+        { key: 1, label: `退款号`, visible: true },
+        { key: 2, label: `支付单号`, visible: true },
+        { key: 3, label: `购票人手机号`, visible: true },
+        { key: 4, label: `门票名称`, visible: true },
+        { key: 5, label: `规格`, visible: true },
+        { key: 6, label: `购票渠道`, visible: true },
+        { key: 7, label: `退款申请时间`, visible: true },
+        { key: 8, label: `退款金额`, visible: true },
+        { key: 9, label: `申请原因`, visible: true },
+        { key: 10, label: `退款状态`, visible: true },
+      ],
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询用户列表 */
+    getList() {
+      this.loading = true;
+      let params = JSON.parse(JSON.stringify({
+          ...this.queryParams,
+          refundBeginCreateTime: this.queryParams.time&&this.queryParams.time[0]?this.queryParams.time[0]:null,
+          refundEndCreateTime: this.queryParams.time&&this.queryParams.time[1]?this.queryParams.time[1]:null,
+      }))
+      delete params.time;
+      listTableApi(
+        this.configUrl.list,
+        this.addDateRange(
+          params,
+          this.dateRange)).then(response => {
+            this.tableList = response.data.rows;
+            this.total = response.data.total;
+            this.loading = false;
         }
-      },
-      /**    */
-      handleDetails(row){
-        if(this.$refs.detailsBox) {
-          this.$refs.detailsBox.initData(this.title + '详情',"DEATILS", row)
-        }
-      },
-      /**    */
-      refundAuditFun(row){
-        if(this.$refs.detailsBox) {
-          this.$refs.detailsBox.initData(this.title + '审核',"DEATILSADD", 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)
+      ).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 + '详情',"DEATILS", row)
+      }
+    },
+    /**    */
+    refundAuditFun(row){
+      if(this.$refs.detailsBox) {
+        this.$refs.detailsBox.initData(this.title + '审核',"DEATILSADD", row)
+      }
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除数据项?').then( () => {
+        return delTableParamsApi(this.configUrl.delect,{
+          id: ids
         });
-      },
-      /** 导出按钮操作 */
-      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)
-        this.$modal.confirm(`是否确认${row.status == 1 ? '关闭' : '打开'} ${row.titleName}吗?`).then( () => {
-          return updateTableApi(this.configUrl.edit,{
-            ...row,
-            status: row.status == 1 ? 0 : 1
-          });
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess(`${row.status == 1 ? '打开' : '关闭'}成功`);
-        }).catch((e) => {
-          console.error("失败====",e)
+      }).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)
+      this.$modal.confirm(`是否确认${row.status == 1 ? '关闭' : '打开'} ${row.titleName}吗?`).then( () => {
+        return updateTableApi(this.configUrl.edit,{
+          ...row,
+          status: row.status == 1 ? 0 : 1
         });
-      },
-    }
-  };
-  </script>
-  
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess(`${row.status == 1 ? '打开' : '关闭'}成功`);
+      }).catch((e) => {
+        console.error("失败====",e)
+      });
+    },
+  }
+};
+</script>

+ 24 - 13
src/views/tourism/membershipManagement/electronicMembership/memberInformation.vue

@@ -79,15 +79,23 @@
                 <dict-tag :options="dict.type.tourism_memberInformation_user_type" :value="scope.row.type"/>
               </template>
             </el-table-column>
-            <el-table-column label="手机号" align="center" key="mobile" prop="mobile" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="身份证号" align="center" key="cardId" prop="cardId" v-if="columns[4].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="积分" align="center" key="credit" prop="credit" v-if="columns[5].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="余额" align="center" key="balance" prop="balance" v-if="columns[6].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="购买次数" align="center" key="buyCount" prop="buyCount" v-if="columns[7].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="消费总额" align="center" key="consumeTotal" prop="consumeTotal" v-if="columns[8].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="状态" align="center" key="status" prop="status" v-if="columns[9].visible" :show-overflow-tooltip="true">
+            <el-table-column label="会员等级" align="center" key="levelName" prop="levelName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="手机号" align="center" key="mobile" prop="mobile" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="身份证号" align="center" key="cardId" prop="cardId" v-if="columns[5].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="积分" align="center" key="credit" prop="credit" v-if="columns[6].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="余额" align="center" key="balance" prop="balance" v-if="columns[7].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="购买次数" align="center" key="buyCount" prop="buyCount" v-if="columns[8].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="消费总额" align="center" key="consumeTotal" prop="consumeTotal" v-if="columns[9].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="禁用/启用" align="center" key="status" v-if="columns[10].visible">
               <template slot-scope="scope">
-                <dict-tag :options="dict.type.tourism_memberInformation_status" :value="scope.row.status"/>
+                <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="lastCreateTime" prop="lastCreateTime" v-if="columns[10].visible" :show-overflow-tooltip="true" />
@@ -141,6 +149,7 @@
   import { 
     listTableApi, 
     delTableParamsApi,
+    addTableApi
   } from "@/api/CURD";
   import detailsBox from "./detailsBox/memberInformationDetails.vue"
   import setIntegralForm from "./formBox/setIntegralForm.vue"
@@ -166,6 +175,7 @@
           upload: '',// 导入地址
           download:'', // 下载模板地址
           export: '',// 导出地址
+          updateStatus: '/member/memberInfo/enable', // 编辑地址
         },
         // 遮罩层
         loading: true,
@@ -192,6 +202,7 @@
           { key: 0, label: `用户名`, visible: true },
           { key: 1, label: `会员号`, visible: true },
           { key: 2, label: `会员类型`, visible: true },
+          { key: 2.5, label: `会员等级`, visible: true },
           { key: 3, label: `手机号`, visible: true },
           { key: 4, label: `身份证号`, visible: true },
           { key: 5, label: `积分`, visible: true },
@@ -301,14 +312,14 @@
       /** 开/闭 园 */
       openAttraction(row) {
         console.log("row======",row)
-        this.$modal.confirm(`是否确认${row.status == 2 ? '关闭' : '打开'} ${row.name}园区吗?`).then( () => {
-          return addTableApi(this.configUrl.edit,{
-            ...row,
-            status: row.status == 1 ? 2 : 1
+        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 == 1 ? '打开' : '关闭'}成功`);
+          this.$modal.msgSuccess(`${row.status == 0 ? '启用' : '禁用'}成功`);
         }).catch((e) => {
           console.error("失败====",e)
         });

+ 326 - 0
src/views/tourism/membershipManagement/physicalCard/detailsBox/memberInformationDetails.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.name }}</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>

+ 491 - 0
src/views/tourism/membershipManagement/physicalCard/formBox/membershipLevelForm.vue

@@ -0,0 +1,491 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="75%"
+    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="200px">
+          <div class="form-title"><span>基本信息</span></div>
+          <el-form-item label="等级名称:" prop="name">
+            <el-input style="width: 350px;" v-model="form.name" placeholder="请输入等级名称" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="所需积分值:" prop="upIntegral">
+            <el-input-number style="width: 350px;" v-model="form.upIntegral" controls-position="right" placeholder="请输入所需积分值"></el-input-number>
+          </el-form-item>
+          <el-form-item label="等级图片" prop="logo">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.logo" 
+              :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.logo">
+                </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.logo||form.logo.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>建议尺寸XXX*XXX,支持jpg、png,支持100KB大小以内的图片上传</span>
+          </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="discount" label-width="100px">
+                <el-input-number style="width: 150px;" v-model="form.discount" 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.classifyList||form.classifyList.length==0" type="primary" @click="addClassifyList">添加单品</el-button>
+            </div>
+            
+            <div v-for="(item,index) in form.classifyList" :key="index" style="margin-top: 10px;display: flex;align-items: center;">
+              <el-form-item label="单品折扣:" label-width="100px">
+                <el-select v-model="form.classifyList[index].classifyId" 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.classifyList[index].discount" 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.classifyList.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="积分权益:">
+            <el-form-item label="积分成长系数:" prop="integralRatio" label-width="120px">
+              <el-input-number style="width: 150px;" v-model="form.integralRatio" placeholder="请输入积分成长系数" controls-position="right"></el-input-number>
+              <span style="padding-bottom: 15px;font-size: 12px;color: #ccc;">(会员下单获取积分值=实付金额**积分规则基础系数"会员成长系数会员系数越大,获得成长值越多,建议数值设置不要过大)</span>
+            </el-form-item>
+          </el-form-item>
+          <el-form-item label="专属优惠卷:" prop="couponIdList">
+            <el-select v-model="form.couponIdLList" clearable placeholder="请选择专属优惠卷">
+              <el-option
+                v-for="item in scenicAreaProducts"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+                </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="指定产品不参与会员折扣:" prop="goodsIdList">
+            <el-select v-model="form.goodsIdList" clearable placeholder="请选择指定产品不参与会员折扣">
+              <el-option
+                v-for="item in scenicAreaProducts"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+                </el-option>
+            </el-select>
+          </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
+ } 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: '/member/memberLevelInfo/insertOrUpdate', // 新增地址
+        details: '/member/memberLevelInfo/selectById', // 详情地址
+        edit: '/member/memberLevelInfo/insertOrUpdate', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {
+        name: [{ required: true, message: "请输入等级名称", trigger: ["change","blur"] }],
+        logo: [{ required: true, message: "请上传图片", trigger: ["change","blur"] }],
+        upIntegral: [{ required: true, message: "请输入所需积分值", trigger: ["change","blur"] }],
+        discount: [{ required: true, message: "请输入基本折扣", trigger: ["change","blur"] }],
+        integralRatio: [{ required: true, message: "请输入积分成长系数", trigger: ["change","blur"] }],
+      },
+      scenicAreaProducts: [],// 景点产品关联
+
+      //  上传文件
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
+    };
+  },
+  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,logo:[]})
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row,
+          logo: row.logo?row.logo.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,
+            logo: res.data.logo?res.data.logo.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(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                ...this.form,
+                logo: this.form.logo ? this.form.logo.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,{
+                ...this.form,
+                logo: this.form.logo ? this.form.logo.join(','):''
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              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;
+    },
+
+    /**  上传图片 单张  */
+    handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.logo.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.logo.splice(index,1)
+    },
+
+    /** 填加单品  */
+    addClassifyList(){
+      let list = []
+      if(this.form.classifyList) {
+        list = JSON.parse(JSON.stringify(this.form.classifyList))
+      }
+      list.push({
+        classifyId: null,
+        discount: null,
+        classifyName: null
+      })
+      this.$set(this.form,'classifyList',list)
+    }, 
+    /** 移除单品  */
+    clearClassifyList(index) {
+      this.form.classifyList.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>

+ 151 - 241
src/views/tourism/membershipManagement/physicalCard/formBox/physicalCardAllocationForm.vue

@@ -12,43 +12,45 @@
         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="goodsName">
-            <el-input style="width: 100%;" v-model="form.goodsName" placeholder="请输入实体卡名称" maxlength="50"
+          <el-form-item label="实体卡名称:" prop="cardName">
+            <el-input style="width: 100%;" v-model="form.cardName" placeholder="请输入实体卡名称" maxlength="50"
               show-word-limit />
           </el-form-item>
-          <el-form-item label="实体卡价格:" prop="goodsSnapshot">
-            <el-input-number v-model="form.goodsSnapshot" placeholder="请输入实体卡价格" controls-position="right">
+          <el-form-item label="实体卡价格:" prop="price">
+            <el-input-number v-model="form.price" placeholder="请输入实体卡价格" controls-position="right">
             </el-input-number>
+            <span>元</span>
           </el-form-item>
-          <el-form-item label="消费日期:" prop="useExpireDateRadio">
-            <el-radio-group v-model="form.useExpireDateRadio" @input="radioInputs">
+          <div class="form-title"><span>使用规则</span></div>
+          <el-form-item label="使用期限:" prop="useType">
+            <el-radio-group v-model="form.useType" @input="radioInputs">
               <div style="display: flex;flex-direction: column;padding-top: 10px;">
                 <div>
-                  <el-radio label="1">不限</el-radio>
+                  <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">
+                  <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="'useExpireDateDay'">
-                        <span>自购买后</span>
-                        <el-input-number :disabled="form.useExpireDateRadio != 2" v-model="form.useExpireDateDay"
+                      <el-form-item label="" label-width="0" :prop="'useDay'">
+                        <span>指定</span>
+                        <el-input-number :disabled="form.useType != 2" v-model="form.useDay"
                           placeholder="请输入天数" controls-position="right">
                         </el-input-number>
-                        <span>天可使用</span>
+                        <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">
+                  <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="'useExpireDateTime'">
+                      <el-form-item label="" label-width="0" :prop="'useEndDay'">
                         <span>指定</span>
-                        <el-date-picker :disabled="form.useExpireDateRadio != 3" v-model="form.useExpireDateTime"
-                          type="daterange" range-separator="至" start-placeholder="开始日期" value-format="yyyy-MM-dd"
-                          end-placeholder="结束日期">
+                        <el-date-picker :disabled="form.useType != 3" v-model="form.useEndDay"
+                        type="date" placeholder="请选择日期" value-format="yyyy-MM-dd"
+                          >
                         </el-date-picker>
-                        <span>日期范围内使用</span>
+                        <span>结束日期</span>
                       </el-form-item>
                     </div>
                   </el-radio>
@@ -57,109 +59,84 @@
               </div>
             </el-radio-group>
           </el-form-item>
-          <el-form-item label="生效日期:" prop="isAuth">
-            <el-radio-group v-model="form.isAuth">
+          <el-form-item label="生效日期:" prop="effectiveDateType">
+            <el-radio-group v-model="form.effectiveDateType">
               <el-radio :label="1">制卡之日生效</el-radio>
               <el-radio :label="2">激活之日生效</el-radio>
             </el-radio-group>
           </el-form-item>
           <div class="form-title"><span>激活规则</span></div>
-          <el-form-item label="激活后完善信息:" prop="backStatus">
-            <el-checkbox-group>
-              <el-checkbox label="真实姓名"></el-checkbox>
-              <el-checkbox label="身份证号"></el-checkbox>
-              <el-checkbox label="需实名制认证"></el-checkbox>
-              <el-checkbox label="所在地区"></el-checkbox>
-              <el-checkbox label="手机号"></el-checkbox>
-              <el-checkbox label="需短信验证"></el-checkbox>
+          <el-form-item label="激活后完善信息:" prop="activationRule">
+            <el-checkbox-group v-model="form.activationRule">
+              <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>
-          <el-form-item label="提前退票" prop="backStatusRadio">
-            <div style="display: flex;align-items: center;">
-              <el-radio-group v-model="form.backStatusRadio" @input="radioInputss">
-                <el-radio label="-1">不限</el-radio>
-                <el-radio label="-2">{{ '' }}</el-radio>
-              </el-radio-group>
-              <div style="display: flex;align-items: center;">
-                需提前
-                <el-form-item label="" label-width="0" :prop="'backStatusDay'">
-                  <el-input-number :disabled="form.backStatusRadio != -2" v-model="form.backStatusDay" placeholder="请输入天数"
-                    controls-position="right">
-                  </el-input-number>
-                </el-form-item>
-                天,在
-                <el-form-item label="" label-width="0" :prop="'backStatusTime'">
-                  <el-time-picker :disabled="form.backStatusRadio != -2" v-model="form.backStatusTime"
-                    value-format="HH:mm" placeholder="任意时间点">
-                  </el-time-picker>
-                </el-form-item>
-                点前退票
-              </div>
-            </div>
-          </el-form-item>
-          <el-form-item label="过期未核销" prop="expiredProcess">
-            <el-radio-group v-model="form.expiredProcess">
-              <el-radio :label="1">自动退款</el-radio>
-              <el-radio :label="2">自动核销</el-radio>
-            </el-radio-group>
-          </el-form-item>
-          <div class="form-title"><span>特殊票种</span></div>
-          <el-form-item label="指定年龄" prop="ageRadio">
+          <div class="form-title"><span>权益规则</span></div>
+          <el-form-item label="支持储值" prop="isStorageValue">
             <div style="display: flex;align-items: center;">
-              <el-radio-group v-model="form.ageRadio" @input="radioInputsss">
-                <el-radio label="-1">不限</el-radio>
-                <el-radio label="-2">{{ '' }}</el-radio>
+              <el-radio-group v-model="form.isStorageValue" @input="radioInputsss">
+                <el-radio :label="0">不可储值</el-radio>
+                <el-radio :label="1">可储值</el-radio>
               </el-radio-group>
               <div style="display: flex;align-items: center;">
-                年龄限购
-                <el-form-item label="" label-width="0" prop="ageMin">
-                  <el-input-number :disabled="form.ageRadio != -2" v-model="form.ageMin" placeholder="请输入年龄"
+                <el-form-item label="最小储值金额" label-width="120px" prop="minAmount">
+                  <el-input-number :disabled="form.isStorageValue != 1" v-model="form.minAmount" placeholder="请输入最小储值金额"
                     controls-position="right">
                   </el-input-number>
                 </el-form-item>
-                至
-                <el-form-item label="" label-width="0" prop="ageMax">
-                  <el-input-number :disabled="form.ageRadio != -2" v-model="form.ageMax" placeholder="请输入年龄"
+                <el-form-item label="最大储值金额" label-width="120px" prop="maxAmount">
+                  <el-input-number :disabled="form.isStorageValue != 1" v-model="form.maxAmount" placeholder="请输入最大储值金额"
                     controls-position="right">
                   </el-input-number>
                 </el-form-item>
               </div>
             </div>
           </el-form-item>
-          <el-form-item label="指定性别" prop="sex">
-            <el-radio-group v-model="form.sex">
-              <el-radio :label="-1">不限</el-radio>
-              <el-radio :label="1">男</el-radio>
-              <el-radio :label="2">女</el-radio>
+          <el-form-item label="支持积分" prop="isCredit">
+            <el-radio-group v-model="form.isCredit">
+              <el-radio :label="0">不可积分</el-radio>
+              <el-radio :label="1">可积分</el-radio>
             </el-radio-group>
+            <span style="color: #ccc;">(积分跟随实体卡卡号,实体卡不与电子会员的积分融合,不支持实体卡与电子会员的绑定)</span>
           </el-form-item>
-          <el-form-item label="指定地点" prop="areaRadio">
+          <el-form-item label="折扣权益:">
             <div style="display: flex;align-items: center;">
-              <el-radio-group v-model="form.areaRadio" @input="value => radioInput('area', value)">
-                <el-radio label="-1">不限</el-radio>
-                <el-radio label="-2">{{ '' }}</el-radio>
-              </el-radio-group>
-              <div style="display: flex;align-items: center;">
-                限定区域,区域身份证号
-                <el-form-item label="" label-width="0" prop="area">
-                  <el-input :disabled="form.areaRadio != -2" placeholder="请输入身份证号" v-model="form.area">
-                  </el-input>
-                </el-form-item>
-                <span style="">多个以,隔开</span>
-              </div>
+              <el-form-item label="基本折扣:" prop="discountValue" label-width="100px">
+                <el-input-number style="width: 150px;" v-model="form.discountValue" 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].discountValue" 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>
-            <el-button @click="reset">重置表单</el-button>
-            <el-button v-if="form && form.goodsId" 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-button type="primary" @click="submitForm(true)" :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 label="积分权益:">
+            <el-form-item label="积分成长系数:" prop="integralRatio" label-width="120px">
+              <el-input-number style="width: 150px;" v-model="form.integralRatio" placeholder="请输入积分成长系数" controls-position="right"></el-input-number>
+              <span style="padding-bottom: 15px;font-size: 12px;color: #ccc;">(用户下单获取积分值=实付金额**积分规则基础系数*会员成长系数会员系数越大,获得成长值越多,建议数值设置不要过大)</span>
+            </el-form-item>
+          </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>
@@ -186,7 +163,7 @@ import {
 
 export default {
   name: "addAndEdit",
-  dicts: ['tourism_scenicAreaTickets_status', 'tourism_scenicAreaTickets_type', 'tourism_scenicAreaTickets_type'],
+  dicts: ['activation_rule'],
   data() {
     return {
       title: "",
@@ -196,47 +173,34 @@ export default {
       loadingText: "拼命加载数据中...",
       formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
       configUrl: {
-        add: '/merchant/merchantPerformAuditorium/saveMerchantGoods', // 新增地址
-        details: '/merchant/merchantPerformAuditorium/merchantGoodsDetail', // 规格详情
-        list: '/merchant/merchantPerformAuditorium/merchantGoodsList',// 规格列表
-        edit: '/merchant/merchantPerformAuditorium/saveMerchantGoods', // 编辑地址
-        updateStatusById: '/goods/goods/updateStatus',
+        add: '/merchant/merchantEntitycardConfig/insertOrUpdate', // 新增地址
+        details: '/merchant/merchantEntitycardConfig/selectById', // 规格详情
+        edit: '/merchant/merchantEntitycardConfig/insertOrUpdate', // 编辑地址
       },
       performId: null,
       form: {
         id: undefined,
+        activationRule: []
       },
       rules: {
-        goodsName: [{ required: true, message: "请输入票种规格名称", trigger: ["change", "blur"] }],
-        goodsSnapshot: [{ required: true, message: "请输入规格描述", trigger: ["change", "blur"] }],
-
-        dayTypeRadio: [{ required: true, message: "请选择日期类型", trigger: ["change", "blur"] }],
-        dayType: [{ required: false, message: "请选择时间范围", trigger: ["change", "blur"] }],
+        cardName: [{ required: true, message: "请输入实体卡名称", trigger: ["change", "blur"] }],
+        price: [{ required: true, message: "请输入实体卡价格", trigger: ["change", "blur"] }],
 
-        useExpireDateRadio: [{ required: true, message: "请选择费日期", trigger: ["change", "blur"] }],
-        useExpireDateDay: [{ required: false, message: "请输入天数", trigger: ["change", "blur"] }],
-        useExpireDateTime: [{ required: false, message: "请选择时间", trigger: ["change", "blur"] }],
+        useType: [{ required: true, message: "请选择使用期限", trigger: ["change", "blur"] }],
+        useDay: [{ required: false, message: "请输入天数", trigger: ["change", "blur"] }],
+        useEndDay: [{ required: false, message: "请选择日期", trigger: ["change", "blur"] }],
 
-        salePrice: [{ required: true, message: "请输入小程序价格", trigger: ["change", "blur"] }],
-        originalPrice: [{ required: true, message: "请输入规划价格", trigger: ["change", "blur"] }],
+        effectiveDateType: [{ required: true, message: "请选择生效日期", trigger: ["change", "blur"] }],
+        activationRule: [{ required: true, message: "请选择激活后完善信息", trigger: ["change", "blur"] }],
 
-        isAuth: [{ required: true, message: "请选择实名购票", trigger: ["change", "blur"] }],
-        oneMany: [{ required: true, message: "请选择实名要求", trigger: ["change", "blur"] }],
-        backStatus: [{ required: true, message: "请选择退票政策", trigger: ["change", "blur"] }],
+        isStorageValue: [{ required: true, message: "请选择支持储值", trigger: ["change", "blur"] }],
+        minAmount: [{ required: false, message: "请输入最小储值金额", trigger: ["change", "blur"] }],
+        maxAmount: [{ required: false, message: "请输入最大储值金额", trigger: ["change", "blur"] }],
 
-        backStatusRadio: [{ required: true, message: "请选择提前退票", trigger: ["change", "blur"] }],
-        backStatusDay: [{ required: false, message: "请输入时间", trigger: ["change", "blur"] }],
-        backStatusTime: [{ required: false, message: "请选择时间点", trigger: ["change", "blur"] }],
+        isCredit: [{ required: true, message: "请选择支持积分", trigger: ["change", "blur"] }],
 
-        expiredProcess: [{ required: true, message: "请选择过期未核销", trigger: ["change", "blur"] }],
-        ageRadio: [{ required: true, message: "请选择指定年龄", trigger: ["change", "blur"] }],
-        ageMin: [{ required: false, message: "请输入年龄限购", trigger: ["change", "blur"] }],
-        ageMax: [{ required: false, message: "请输入年龄限购", trigger: ["change", "blur"] }],
-
-        sex: [{ required: true, message: "请选择指定性别", trigger: ["change", "blur"] }],
-
-        areaRadio: [{ required: true, message: "请选择指定地点", trigger: ["change", "blur"] }],
-        area: [{ required: false, message: "请输入身份证", trigger: ["change", "blur"] }],
+        discountValue: [{ required: true, message: "请输入基本折扣", trigger: ["change", "blur"] }],
+        integralRatio: [{ required: true, message: "请输入积分成长系数", trigger: ["change", "blur"] }],
       },
       tableList: [],// 景点产品关联
     };
@@ -271,14 +235,21 @@ export default {
     },
     /** 获取详情 */
     async getTableDeatilsFun(row) {
-      const id = row.goodsId
+      const id = row.id
       this.loading = true
       try {
-        let res = await getTableDeatilsByIdApi(this.configUrl.details, { goodsId: id })
+        let res = await getTableDeatilsByIdApi(this.configUrl.details, { id })
         if (res.code == 200) {
           let obj = {
             ...res.data,
+            activationRule: res.data.activationRule?res.data.activationRule.split(','):[]
+          }
+          if(obj.isStorageValue==1) {
+            obj['minAmount'] = obj.storageConfig.minAmount
+            obj['maxAmount'] = obj.storageConfig.maxAmount
           }
+          this.radioInputs(obj.useType)
+          this.radioInputsss(obj.isStorageValue)
           this.$set(this, 'form', JSON.parse(JSON.stringify(obj)))
           this.formStatus = 1
         } else {
@@ -306,12 +277,27 @@ export default {
         if (valid) {
           this.loadingText = "提交数据中..."
           this.loading = true
+          let params = JSON.parse(JSON.stringify(this.form))
+          if(params.isStorageValue == 1) {
+            params['storageConfig'] = {
+              isCredit: this.form.isCredit,
+              minAmount: this.form.minAmount,
+              maxAmount: this.form.maxAmount
+            }
+          }
+          delete params.minAmount
+          delete params.maxAmount
           addTableApi(this.configUrl.edit, {
             ...this.form,
+            activationRule: this.form.activationRule?this.form.activationRule.join(','):null,
+            storageConfig: {
+              minAmount: this.form.minAmount,
+              maxAmount: this.form.maxAmount
+            }
           }).then(response => {
             this.$modal.msgSuccess(`${this.form.goodsId ? '编辑' : '新增'}成功`);
             this.loading = false
-            this.$set(this, 'form', {})
+            this.$set(this, 'form', {activationRule:[]})
             this.$nextTick(() => {
               this.$refs.form.clearValidate();
             })
@@ -324,71 +310,6 @@ export default {
         }
       });
     },
-    resetFormData(type) {
-      let params = JSON.parse(JSON.stringify(this.form))
-
-      if (params.dayTypeRadio == -1) { // 日期类型
-        params.dayType = null
-      } else {
-        params.dayType = params.dayType ? params.dayType.join('~') : null
-      }
-
-      if (params.useExpireDateRadio == 1) { // 消费日期
-        params['useExpireDate'] = JSON.stringify({
-          type: 1,
-          value: null
-        })
-      } else if (params.useExpireDateRadio == 2) {
-        params['useExpireDate'] = JSON.stringify({
-          type: 2,
-          value: params.useExpireDateDay
-        })
-      } else if (params.useExpireDateRadio == 3) {
-        params['useExpireDate'] = JSON.stringify({
-          type: 3,
-          value: params.useExpireDateTime ? params.useExpireDateTime.join('~') : null
-        })
-      }
-
-      if (params.backStatusRadio == -1) { // 提前退票
-        params['goodsPerformRefundRule'] = null
-      } else if (params.backStatusRadio == -2) {
-        params['goodsPerformRefundRule'] = {
-          days: params.backStatusDay,
-          hour: params.backStatusTime,
-        }
-      }
-      params['goodsPerformSpecial'] = {}
-      params.goodsPerformSpecial['sex'] = params.sex == -1 ? null : params.sex
-      if (params.ageRadio == -1) { // 指定年龄
-        params.goodsPerformSpecial['age'] = null
-      } else if (params.ageRadio == -2) {
-        params.goodsPerformSpecial['age'] = params.ageMin + "~" + params.ageMax
-      }
-      if (params.areaRadio == -1) { // 指定年龄
-        params.goodsPerformSpecial['area'] = null
-      } else if (params.areaRadio == -2) {
-        params.goodsPerformSpecial['area'] = params.area
-      }
-      if (type) {
-        params['goodsId'] = null
-      } else {
-        params['goodsId'] = params.goodsId
-      }
-      delete params.dayTypeRadio
-      delete params.useExpireDateRadio
-      delete params.backStatusRadio
-      delete params.ageRadio
-      delete params.areaRadio
-      delete params.useExpireDateTime
-      delete params.useExpireDateDay
-      delete params.ageMax
-      delete params.ageMin
-      delete params.backStatusDay
-      delete params.backStatusTime
-      delete params.sex
-      return params
-    },
     /**
      * 重置
      * @date 2023-11-22
@@ -397,7 +318,7 @@ export default {
     reset() {
       if (this.$refs["form"]) {
         //this.$refs["form"].resetFields();
-        this.$set(this, 'form', {})
+        this.$set(this, 'form', {activationRule:[]})
         this.$nextTick(() => {
           this.$refs["form"].clearValidate();
         })
@@ -412,61 +333,50 @@ export default {
       this.reset();
       this.open = false;
     },
-    handleAdd() {
-      this.$set(this, 'form', {})
-      this.$nextTick(() => {
-        this.$refs["form"].clearValidate();
-      })
-    },
-    /**    */
-    radioInput(key, value) {
-      console.log('key,value===', key, value)
-      if (value == -2) {
-        this.rules[key][0].required = true
-      } else {
-        this.rules[key][0].required = false
-      }
-    },
     /** */
     radioInputs(value) {
       if (value == 1) {
-        this.rules.useExpireDateDay[0].required = false
-        this.rules.useExpireDateTime[0].required = false
-        this.$refs.form.clearValidate('useExpireDateTime');
-        this.$refs.form.clearValidate('useExpireDateDay');
+        this.rules.useDay[0].required = false
+        this.rules.useEndDay[0].required = false
+        this.$refs.form.clearValidate('useDay');
+        this.$refs.form.clearValidate('useEndDay');
       } else if (value == 2) {
-        this.rules.useExpireDateDay[0].required = true
-        this.rules.useExpireDateTime[0].required = false
-        this.$refs.form.clearValidate('useExpireDateTime');
+        this.rules.useDay[0].required = true
+        this.rules.useEndDay[0].required = false
+        this.$refs.form.clearValidate('useEndDay');
       } else if (value == 3) {
-        this.rules.useExpireDateDay[0].required = false
-        this.rules.useExpireDateTime[0].required = true
-        this.$refs.form.clearValidate('useExpireDateDay');
+        this.rules.useDay[0].required = false
+        this.rules.useEndDay[0].required = true
+        this.$refs.form.clearValidate('useDay');
       }
     },
     /** */
-    radioInputss(value) {
-      if (value == -1) {
-        this.rules.backStatusDay[0].required = false
-        this.rules.backStatusTime[0].required = false
-        this.$refs.form.clearValidate('backStatusDay');
-        this.$refs.form.clearValidate('backStatusTime');
-      } else if (value == -2) {
-        this.rules.backStatusDay[0].required = true
-        this.rules.backStatusTime[0].required = true
+    radioInputsss(value) {
+      if (value == 0) {
+        this.rules.minAmount[0].required = false
+        this.rules.maxAmount[0].required = false
+        this.$refs.form.clearValidate('minAmount');
+        this.$refs.form.clearValidate('maxAmount');
+      } else if (value == 1) {
+        this.rules.minAmount[0].required = true
+        this.rules.maxAmount[0].required = true
       }
     },
-    /** */
-    radioInputsss(value) {
-      if (value == -1) {
-        this.rules.ageMin[0].required = false
-        this.rules.ageMax[0].required = false
-        this.$refs.form.clearValidate('ageMin');
-        this.$refs.form.clearValidate('ageMax');
-      } else if (value == -2) {
-        this.rules.ageMin[0].required = true
-        this.rules.ageMax[0].required = true
+    /** 填加单品  */
+    addClassifyList(){
+      let list = []
+      if(this.form.discountGoodList) {
+        list = JSON.parse(JSON.stringify(this.form.discountGoodList))
       }
+      list.push({
+        goodId: null,
+        discountValue: null
+      })
+      this.$set(this.form,'discountGoodList',list)
+    }, 
+    /** 移除单品  */
+    clearClassifyList(index) {
+      this.form.discountGoodList.splice(index,1)
     }
   },
 };

+ 320 - 0
src/views/tourism/membershipManagement/physicalCard/formBox/setIntegralForm.vue

@@ -0,0 +1,320 @@
+<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">
+          <el-form-item label="积分变动" prop="type">
+            <el-radio-group v-model="form.type">
+              <el-radio 
+                v-for="dict in dict.type.tourism_memberInformation_biangeng_type"
+                :label="dict.value"
+                >{{ dict.label }}</el-radio>
+            </el-radio-group>
+            </el-form-item>
+            <el-form-item label="变动量" prop="num">
+              <el-input-number v-model="form.num" controls-position="right" :precision="0" :min="0" placeholder="请输入变动量"></el-input-number>
+            </el-form-item>
+            <el-form-item label="变动原因说明" prop="remark">
+              <el-input style="width: 350px;" 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">取消</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
+ } from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_memberInformation_biangeng_type'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/member/memberInfo/updateCredit', // 新增地址
+        details: '/member/memberInfo/detail', // 详情地址
+        edit: '/member/memberInfo/updateCredit', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {
+        type: [{ required: true, message: "请选择积分变动", trigger: ["change","blur"] }],
+        num: [{ required: true, message: "请输入变动量", trigger: ["change","blur"] }],
+        remark: [{ required: true, message: "请输入变动原因说明", trigger: ["change","blur"] }],
+      },
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      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',{
+          memberId: row.id
+        })
+        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
+          }
+          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(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                ...this.form
+              }).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,{
+                ...this.form
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              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;
+    },
+  },
+};
+</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;
+      }
+    }
+  }
+}
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 328 - 0
src/views/tourism/membershipManagement/physicalCard/formBox/setStoredValue.vue

@@ -0,0 +1,328 @@
+<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.8)">
+      <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">
+          <el-form-item label="账户余额">
+            <span>{{ form.balance }}</span>
+          </el-form-item>
+          <el-form-item label="可退余额">
+            <span>{{ form.refundBalance }}</span>
+          </el-form-item>
+          <el-form-item label="储值变动" prop="type">
+            <el-radio-group v-model="form.type">
+              <el-radio 
+                v-for="dict in dict.type.tourism_memberInformation_biangeng_type"
+                :label="dict.value"
+                >{{ dict.label }}</el-radio>
+            </el-radio-group>
+            </el-form-item>
+            <el-form-item label="变动量" prop="num">
+              <el-input-number v-model="form.num" controls-position="right" :min="0"  placeholder="请输入变动量"></el-input-number>
+            </el-form-item>
+            <el-form-item label="变动原因说明" prop="remark">
+              <el-input style="width: 350px;" 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">取消</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
+ } from '@/api/CURD'
+
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_memberInformation_biangeng_type'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/member/memberInfo/updateBalance', // 新增地址
+        details: '/member/memberInfo/detail', // 详情地址
+        edit: '/member/memberInfo/updateBalance', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {
+        type: [{ required: true, message: "请选择储值变动", trigger: ["change","blur"] }],
+        num: [{ required: true, message: "请输入变动量", trigger: ["change","blur"] }],
+        remark: [{ required: true, message: "请输入变动原因说明", trigger: ["change","blur"] }],
+      },
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      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',{
+          balance: row.balance,
+          refundBalance: row.refundBalance,
+          memberId: row.id 
+        })
+        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
+          }
+          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(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                ...this.form
+              }).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,{
+                ...this.form
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              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;
+    },
+  },
+};
+</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;
+      }
+    }
+  }
+}
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 69 - 11
src/views/tourism/membershipManagement/physicalCard/physicalCardAllocation.vue

@@ -4,9 +4,9 @@
         <!--用户数据-->
         <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="name">
+                <el-form-item label="实体卡名称" prop="cardName">
                     <el-input
-                    v-model="queryParams.name"
+                    v-model="queryParams.cardName"
                     placeholder="请输入实体卡名称"
                     clearable
                     style="width: 240px"
@@ -34,13 +34,29 @@
   
           <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="name1" prop="name1" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="使用期限" align="center" key="name2" prop="name2" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="生效日期" align="center" key="name3" prop="name3" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="支持储值" align="center" key="name4" prop="name4" v-if="columns[4].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="支持积分" align="center" key="name5" prop="name5" v-if="columns[5].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="创捷时间" align="center" key="name6" prop="name6" v-if="columns[6].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="实体卡名称" align="center" key="cardName" prop="cardName" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="实体卡价格" align="center" key="price" prop="price" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="使用期限" align="center" key="useType" prop="useType" 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="name3" prop="name3" 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="name4" prop="name4" v-if="columns[4].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                  <span>{{ setIsStorageValue(scope.row) }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="支持积分" align="center" key="name5" prop="name5" v-if="columns[5].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                  <span>{{ setIsCredit(scope.row) }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="创捷时间" align="center" key="createTime" prop="createTime" v-if="columns[6].visible" :show-overflow-tooltip="true" />
             <el-table-column
               label="操作"
               align="center"
@@ -109,7 +125,7 @@
           release: ['system:user:release']
         },
         configUrl: {
-          list: '/merchant/merchantPerformAuditorium/merchantPerformList', // 列表地址
+          list: '/merchant/merchantEntitycardConfig/pageList', // 列表地址
           delect: '', // 删除地址
           upload: '',// 导入地址
           download:'', // 下载模板地址
@@ -200,7 +216,7 @@
       /** 修改按钮操作 */
       handleUpdate(row) {
         if(this.$refs.addAndEdit) {
-          this.$refs.addAndEdit.initData(this.title + '基本信息编辑', "EDIT",{...row})
+          this.$refs.addAndEdit.initData(this.title + '基本信息编辑', "EDITInit",{...row})
         }
       },
       handleUpdate(row) {
@@ -265,6 +281,48 @@
           console.error("失败====",e)
         });
       },
+      /** 设置使用期限  */
+      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 '--'
+        }
+      },
+      // 生效日期
+      setEffectiveDateType(row){
+        if(row.useType == 1) {
+          return '制卡之日生效'
+        }else if(row.useType == 2) {
+          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>

+ 332 - 0
src/views/tourism/membershipManagement/physicalCard/physicalCardManagement.vue

@@ -0,0 +1,332 @@
+<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="realName">
+              <el-input
+                v-model="queryParams.realName"
+                placeholder="请输入卡号"
+                clearable
+                style="width: 240px"
+                @keyup.enter.native="handleQuery"
+              />
+            </el-form-item>
+            <el-form-item label="持卡人" prop="userName">
+              <el-input
+                v-model="queryParams.userName"
+                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="cardType">
+                <el-select v-model="queryParams.cardType" clearable placeholder="请选择卡类型">
+                  <el-option
+                      v-for="dict in dict.type.tourism_IntegralRecord_cardType"
+                      :key="dict.value"
+                      :label="dict.label"
+                      :value="dict.value">
+                  </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">
+            <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="realName" prop="realName" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="持卡人" align="center" key="memberCode" prop="memberCode" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="手机号" align="center" key="mobile" prop="mobile" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="卡类型" align="center" key="cardType" prop="cardType" v-if="columns[5].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_IntegralRecord_cardType" :value="scope.row.cardType"/>
+              </template>
+            </el-table-column>
+            
+            <el-table-column label="激活时间" align="center" key="cardId" prop="cardId" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="使用期限" align="center" key="credit" prop="credit" v-if="columns[5].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="卡余额" align="center" key="balance" prop="balance" v-if="columns[6].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="卡积分" align="center" key="buyCount" prop="buyCount" v-if="columns[7].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="充值余额" align="center" key="consumeTotal" prop="consumeTotal" v-if="columns[8].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="状态" align="center" key="status" prop="status" v-if="columns[9].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_memberInformation_status" :value="scope.row.status"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="禁用/启用" align="center" key="status" prop="status" v-if="columns[9].visible" :show-overflow-tooltip="true">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_memberInformation_status" :value="scope.row.status"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="最近消费时间" align="center" key="lastCreateTime" prop="lastCreateTime" v-if="columns[10].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="['system:user:resetPwd', 'system:user:edit']">
+                    <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
+                    <el-dropdown-menu slot="dropdown">
+                        <el-dropdown-item command="handleResetPwd" icon="el-icon-key"
+                        v-hasPermi="['system:user:resetPwd']">设置积分</el-dropdown-item>
+                        <el-dropdown-item command="handleAuthRole" icon="el-icon-circle-check"
+                        v-hasPermi="['system:user:edit']">设置储值</el-dropdown-item>
+                        <el-dropdown-item command="handleAuthRole1" icon="el-icon-circle-check"
+                        v-hasPermi="['system:user:edit']">编辑</el-dropdown-item>
+                        <el-dropdown-item command="handleAuthRole2" icon="el-icon-circle-check"
+                        v-hasPermi="['system:user:edit']">重置密码</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>
+      <!--  详情 -->
+      <detailsBox ref="detailsBox" />
+
+      <setIntegralForm ref="setIntegralForm" @refresh="getList" />
+
+      <setStoredValue ref="setStoredValue" @refresh="getList" />
+    </div>
+  </template>
+  
+  <script>
+  import { 
+    listTableApi, 
+    delTableParamsApi,
+  } from "@/api/CURD";
+  import detailsBox from "./detailsBox/memberInformationDetails.vue"
+  import setIntegralForm from "./formBox/setIntegralForm.vue"
+  import setStoredValue from "./formBox/setStoredValue.vue"
+  export default {
+    name: "User",
+    dicts: ['tourism_IntegralRecord_cardType','tourism_memberInformation_status'],
+    components: {detailsBox,setIntegralForm,setStoredValue},
+    data() {
+      return {
+        title: "会员信息",// 通用标题
+        configPermi: {
+          add: ['system:user:edit'], // 新增权限
+          details: ['system:user:details'], // 详情权限
+          delect: ['system:user:remove'], // 删除权限
+          edit: ['system:user:edit'], // 编辑权限
+          upload: ['system:user:upload'],// 导入权限
+          export: ['system:user:export'],// 导出权限
+        },
+        configUrl: {
+          list: '/merchant/merchantEntitycard/pageList', // 列表地址
+          delect: '', // 删除地址
+          upload: '',// 导入地址
+          download:'', // 下载模板地址
+          export: '',// 导出地址
+        },
+        // 遮罩层
+        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: 4, label: `身份证号`, visible: true },
+          { key: 5, label: `激活时间`, visible: true },
+          { key: 6, label: `卡余额`, visible: true },
+          { key: 7, label: `卡积分`, visible: true },
+          { key: 8, label: `充值余额`, visible: true },
+          { key: 9, label: `状态`, visible: true },
+          { key: 10, label: `禁用/启用`, visible: true },
+          { key: 11, 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;
+        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)
+        this.$modal.confirm(`是否确认${row.status == 2 ? '关闭' : '打开'} ${row.name}园区吗?`).then( () => {
+          return addTableApi(this.configUrl.edit,{
+            ...row,
+            status: row.status == 1 ? 2 : 1
+          });
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess(`${row.status == 1 ? '打开' : '关闭'}成功`);
+        }).catch((e) => {
+          console.error("失败====",e)
+        });
+      },
+        handleResetPwd(row) {
+            if(this.$refs.setIntegralForm) {
+            this.$refs.setIntegralForm.initData('设置积分', "EDIT",{...row})
+            }
+        },
+        handleAuthRole(row) {
+            if(this.$refs.setStoredValue) {
+            this.$refs.setStoredValue.initData('设置储值', "EDIT",{...row})
+            }
+        },
+        // 更多操作触发
+        handleCommand(command, row) {
+        switch (command) {
+            case "handleResetPwd":
+            this.handleResetPwd(row);
+            break;
+            case "handleAuthRole":
+            this.handleAuthRole(row);
+            break;
+            default:
+            break;
+        }
+        },
+    }
+  };
+  </script>
+  

+ 9 - 38
src/views/tourism/productManagement/scenicAreaTickets.vue

@@ -19,39 +19,9 @@
   
           <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="showlmg" v-if="columns[1].visible">
-              <template slot-scope="scope">
-                <el-image 
-                v-if="scope.row.showlmg"
-                  style="width: 100px; height: 100px"
-                  :src="scope.row.showlmg" 
-                  :preview-src-list="[scope.row.showlmg]">
-                </el-image>
-                <span v-else>暂无图片</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="产品介绍" align="center" key="performSnapshot" prop="performSnapshot" v-if="columns[2].visible">
-              <template slot-scope="scope">
-                <el-tooltip class="item" effect="dark" placement="top">
-                  <div slot="content"><div v-html="scope.row.performSnapshot"></div></div>
-                  <div style="width: 100%;height: 40px;display: flex;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
-                    <span style="width: 100%;height: 40px;display: flex; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" v-html="scope.row.performSnapshot"></span>
-                  </div>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-            <el-table-column label="购票须知" align="center" key="performNotice" prop="performNotice" v-if="columns[3].visible">
-              <template slot-scope="scope">
-                <el-tooltip class="item" effect="dark" placement="top">
-                  <div slot="content"><div v-html="scope.row.performNotice"></div></div>
-                  <div style="width: 100%;height: 40px;display: flex;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
-                    <span style="width: 100%;height: 40px;display: flex; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" v-html="scope.row.performNotice"></span>
-                  </div>
-                </el-tooltip>
-              </template>
-            </el-table-column>
-            <el-table-column label="可用态" align="center" key="status" prop="status">
+            <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="goodsName" prop="goodsName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="可用状态" align="center" key="status" prop="status" v-if="columns[2].visible">
                 <template slot-scope="scope">
                   <switchBox 
                   :defaultChecked="true" 
@@ -62,7 +32,8 @@
                   :inactive-value="0"
                   />
                 </template>
-              </el-table-column>
+            </el-table-column>
+            <el-table-column label="发布时间" align="center" key="goodsName1" prop="goodsName1" v-if="columns[3].visible" :show-overflow-tooltip="true" />
             <el-table-column
               label="操作"
               align="center"
@@ -163,10 +134,10 @@
         dateRange: [],
         // 控制列表是否显示
         columns: [
-          { key: 0, label: `票名称`, visible: true },
-          { key: 2, label: `门票图片`, visible: true },
-          { key: 3, label: `产品简介`, visible: true },
-          { key: 4, label: `购票须知`, visible: true },
+          { key: 0, label: `票名称`, visible: true },
+          { key: 2, label: `票务规格`, visible: true },
+          { key: 3, label: `可用状态`, visible: true },
+          { key: 4, label: `发布时间`, visible: true },
         ],
       };
     },

+ 325 - 0
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/scenicGuideDistanceForm.vue

@@ -0,0 +1,325 @@
+<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.8)">
+      <el-form :model="form" ref="form" :rules="rules" label-width="130px">
+        <el-form-item label="打卡距离" prop="checkinDistance">
+          <el-input-number v-model="form.checkinDistance" controls-position="right" placeholder="请输入打卡距离"></el-input-number>
+          <span>米</span>
+        </el-form-item>
+      </el-form>
+    </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
+ } from '@/api/CURD'
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_online_status','tourism_online_type'],
+  data() {
+    return {
+      title: "",
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/merchant/merchantMapMark/setDistance', // 新增地址
+        details: '/merchant/merchantMap/info', // 详情地址
+        edit: '/merchant/merchantMapMark/setDistance', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {
+        
+        checkinDistance: [{ required: true, message: "请输入打卡距离", trigger: ["change","blur"] }],
+      },
+    };
+  },
+  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=='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
+        }
+          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(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                id: this.form.id,
+                checkinDistance: this.form.checkinDistance
+              }).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,{
+                checkinDistance: this.form.checkinDistance
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              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;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 30vh;
+  max-height: 30vh;
+  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: 300px;
+    height: 300px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 105 - 0
src/views/tourism/scenicAreaManagement/navigationManagement/formBox/scenicGuideForm.vue

@@ -26,6 +26,37 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="点位图标">
+          <div
+          style="width: 120px;"
+          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"
+              accept=".jpg, .png, jpeg"
+              :on-success="handleAvatarSuccess"
+              :on-progress="handleAvatarProgress"
+              :before-upload="beforeAvatarUpload"
+              :disabled="actionUrlLoading"
+              :on-error="handleAvatarError"
+              >
+              <img v-if="form.imgUrl" style="width: 100px;height: 100px;background-color: rgba(211,211,211,0.6);" :src="form.imgUrl" class="avatar">
+              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+          </div>
+          <span>建议尺寸40*40,支持jpg,png,gif,支持1MB大小以内的图片上传</span>
+        </el-form-item>
+        <el-form-item label="点位信息:">
+          <el-input style="width: 350px;" v-model="form.remark" type="textarea" placeholder="请输入点位信息" maxlength="200" show-word-limit />
+        </el-form-item>
         <el-form-item label="地图定位:">
           <div style="display: flex;">
             <el-form-item label="经度:" label-width="80px" prop="longitude">
@@ -96,6 +127,9 @@ export default {
         content: [{ required: true, message: "请输入开放状态", trigger: ["change","blur"] }],
       },
       pointTypeList: [],// 景点产品关联
+      //  上传文件
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
     };
   },
   created() {
@@ -260,6 +294,54 @@ export default {
     setDot(params){
       this.$set(this.form,'longitude',params.lng)
       this.$set(this.form,'latitude',params.lat)
+    },
+    /**  上传图片  */
+    handleAvatarSuccess(res, file) {
+      console.log("res, file",res, file)
+      this.actionUrlLoading = false
+      if(res.code != 200) {
+        this.$set(this.form,'imgUrl',null) 
+      }else {
+        this.$set(this.form,'imgUrl',res.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','gif']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传头像图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        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;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
     }
   },
 };
@@ -374,6 +456,29 @@ export default {
     }
   }
 }
+::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 {

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

@@ -101,16 +101,10 @@ import {
   updateTableApi,
   addTableApi
  } from '@/api/CURD'
-import { quillEditor } from 'vue-quill-editor'
- 
-import 'quill/dist/quill.core.css'
-import 'quill/dist/quill.snow.css'
-import 'quill/dist/quill.bubble.css'
 
 export default {
   name: "addAndEdit",
   dicts: ['tourism_online_status','tourism_online_type'],
-  components: {quillEditor},
   data() {
     return {
       title: "",

+ 26 - 11
src/views/tourism/scenicAreaManagement/navigationManagement/scenicGuide.vue

@@ -24,7 +24,6 @@
             <el-button
               type="primary"
               plain
-              icon="el-icon-plus"
               size="mini"
               @click="handleAdd"
               v-hasPermi="configPermi.add"
@@ -32,7 +31,6 @@
             <el-button
               type="primary"
               plain
-              icon="el-icon-plus"
               size="mini"
               @click="handleAddImage"
               v-hasPermi="configPermi.add"
@@ -45,7 +43,8 @@
           <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="typeName" prop="typeName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-          <el-table-column label="可用状态" align="center" key="status" v-if="columns[2].visible" :show-overflow-tooltip="true">
+          <el-table-column label="打卡距离(米)" align="center" key="checkinDistance" prop="checkinDistance" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+          <el-table-column label="可用状态" align="center" key="status" v-if="columns[3].visible" :show-overflow-tooltip="true">
             <template slot-scope="scope">
               <switchBox 
               :defaultChecked="true" 
@@ -57,7 +56,7 @@
                />
             </template>
           </el-table-column>
-          <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+          <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"
@@ -87,6 +86,12 @@
                 @click="handleDelete(scope.row)"
                 v-hasPermi="configPermi.delect"
               >删除</el-button>
+              <el-button
+                type="text"
+                size="mini"
+                @click="handleAddDistance(scope.row)"
+                v-hasPermi="configPermi.distance"
+              >打卡距离设置</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -103,7 +108,9 @@
     <!--  新增或修改  -->
     <addAndEdit ref="addAndEdit" @refresh="getList" />
     <!--  景区导览图 -->
-    <scenicGuideImageForm ref="scenicGuideImageForm" />
+    <scenicGuideImageForm ref="scenicGuideImageForm" @refresh="getList" />
+    <!--  打卡距离   -->
+    <scenicGuideDistanceForm ref="scenicGuideDistanceForm" @refresh="getList" />
   </div>
 </template>
 
@@ -115,10 +122,11 @@ import {
 } from "@/api/CURD";
 import addAndEdit from "./formBox/scenicGuideForm.vue"
 import scenicGuideImageForm from "./formBox/scenicGuideImageForm.vue"
+import scenicGuideDistanceForm from "./formBox/scenicGuideDistanceForm.vue"
 export default {
   name: "User",
   dicts: [],
-  components: {addAndEdit,scenicGuideImageForm},
+  components: {addAndEdit,scenicGuideImageForm,scenicGuideDistanceForm},
   data() {
     return {
       title: "景区导览",// 通用标题
@@ -129,6 +137,7 @@ export default {
         edit: ['system:user:edit'], // 编辑权限
         upload: ['system:user:upload'],// 导入权限
         export: ['system:user:export'],// 导出权限
+        distance: ['system:user:distance'] // 设置打卡距离
       },
       configUrl: {
         list: '/merchant/merchantMapMark/pageList', // 列表地址
@@ -160,11 +169,11 @@ export default {
       dateRange: [],
       // 控制列表是否显示
       columns: [
-        { key: 0, label: `点名称`, visible: true },
-        // { key: 1, label: `归属景区`, visible: true },
-        { key: 2, label: `开/闭园时间`, visible: true },
-        { key: 3, label: `开放状态`, visible: true },
-        { key: 4, label: `景点产品`, visible: true },
+        { key: 0, label: `点名称`, visible: true },
+        { key: 2, label: `类型`, visible: true },
+        { key: 3, label: `打卡距离`, visible: true },
+        { key: 4, label: `可用状态`, visible: true },
+        { key: 4, label: `创建时间`, visible: true },
       ],
     };
   },
@@ -217,6 +226,12 @@ export default {
         this.$refs.scenicGuideImageForm.initData(this.title + '手绘图', "EDITInit",{})
       }
     },
+    /** 新增打卡距离  */
+    handleAddDistance(row) {
+      if(this.$refs.scenicGuideDistanceForm) {
+        this.$refs.scenicGuideDistanceForm.initData(this.title + '打卡距离设置', "EDIT",{...row})
+      }
+    },
     /** 新增按钮操作 */
     handleAdd() {
       if(this.$refs.addAndEdit) {