Pārlūkot izejas kodu

充值配置、会员配置

gqx 2 gadi atpakaļ
vecāks
revīzija
b282939541

+ 13 - 1
src/api/api.js

@@ -93,6 +93,13 @@ const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnno
 const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
 //房价方案
 const getRoomPlans = (code,params)=>postAction(`/rooms/roomPricePlan/getRoomPlans/${code}`,params);
+//排除指定id列表查询
+const getSelectList = (params)=>getAction(`/org.jeecg.modules.business/busMarketMember/getSelectList/`,params);
+
+const getBusMarketMemberLablList = (params)=>getAction(`/business/busMarketMemberLable/list`,params);
+const getBusMarketMemberGroupList = (params)=>getAction(`/business/busMarketMemberGroup/list`,params);
+const deleteMarketMemberGroup = (params)=>deleteAction("/business/busMarketMemberGroup/delete",params);
+const deleteMarketMemberLable = (params)=>deleteAction("/business/busMarketMemberLable/delete",params);
 // 中转HTTP请求
 export const transitRESTful = {
   get: (url, parameter) => getAction(getTransitURL(url), parameter),
@@ -157,7 +164,12 @@ export {
   queryMyDepartTreeList,
   getUserNoticeInfo,
   getDictItemsFromCache,
-  getRoomPlans
+  getRoomPlans,
+  getSelectList,
+  getBusMarketMemberLablList,
+  getBusMarketMemberGroupList,
+  deleteMarketMemberGroup,
+  deleteMarketMemberLable
 }
 
 

+ 137 - 0
src/views/settings/components/BusMarketMemberLableList.vue

@@ -0,0 +1,137 @@
+<template>
+  <a-card :bordered="false">
+    <h4 style="margin-bottom: 16px">会员分组设置</h4>
+    <a-tag
+      closable
+      :visible="visible"
+      @close="tagClose(item)"
+      v-for="(item, index) in groups"
+      :key="index"
+      >{{ item.name }}</a-tag
+    >
+
+    <a-button @click="handleAdd" icon="plus">新分组</a-button>
+    <a-divider />
+    <h4 style="margin-bottom: 16px">会员标签设置</h4>
+    <a-tag
+      closable
+      :visible="visible2"
+      @close="tagClose2(item)"
+      v-for="(item, index) in labels"
+      :key="index"
+      >{{ item.name }}</a-tag
+    >
+    <a-button @click="handleAdd2" icon="plus">新标签</a-button>
+    <bus-market-member-lable-modal
+      ref="modalForm2"
+      @ok="modalFormOk2"
+    ></bus-market-member-lable-modal>
+    <bus-market-member-group-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-member-group-modal>
+  </a-card>
+</template>
+  
+  <script>
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMarketMemberLableModal from "./modules/BusMarketMemberLableModal";
+import BusMarketMemberGroupModal from "./modules/BusMarketMemberGroupModal";
+
+import {
+  getBusMarketMemberLablList,
+  getBusMarketMemberGroupList,
+  deleteMarketMemberGroup,
+  deleteMarketMemberLable,
+} from "@/api/api";
+export default {
+  name: "marketRechargeList",
+  mixins: [JeecgListMixin],
+  components: {
+    BusMarketMemberLableModal,
+    BusMarketMemberGroupModal,
+  },
+  data() {
+    return {
+      groups: [],
+      labels: [],
+      visible: true,
+      visible2: true,
+    };
+  },
+  created() {
+    this.initLabelsData();
+    this.initGroupsData();
+  },
+  methods: {
+    initLabelsData() {
+      getBusMarketMemberLablList({ pageNo: 1, pageSize: 100 }).then((res) => {
+        if (res.success) {
+          this.labels = res.result.records;
+        }
+      });
+    },
+    initGroupsData() {
+      getBusMarketMemberGroupList({ pageNo: 1, pageSize: 100 }).then((res) => {
+        if (res.success) {
+          this.groups = res.result.records;
+        }
+      });
+    },
+    modalFormOk() {
+      this.initGroupsData();
+    },
+    modalFormOk2() {
+      this.initLabelsData();
+    },
+    handleAdd2: function () {
+      this.$refs.modalForm2.add();
+      this.$refs.modalForm2.title = "新增";
+      this.$refs.modalForm2.disableSubmit = false;
+    },
+    tagClose(item) {
+      var that = this;
+      this.$confirm({
+        title: "确认删除",
+        content: "是否删除?",
+        onOk: function () {
+          deleteMarketMemberGroup({ id: item.id }).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.initGroupsData();
+            } else {
+              that.$message.warning(res.message);
+            }
+          });
+        },
+        onCancel: function () {
+          that.visible = true;
+        },
+      });
+    },
+    tagClose2(item) {
+      var that = this;
+      this.$confirm({
+        title: "确认删除",
+        content: "是否删除?",
+        onOk: function () {
+          deleteMarketMemberLable({ id: item.id }).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.initLabelsData();
+            } else {
+              that.$message.warning(res.message);
+            }
+          });
+        },
+        onCancel: function () {
+          that.visible2 = true;
+        },
+      });
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 331 - 0
src/views/settings/components/marketRechargeList.vue

@@ -0,0 +1,331 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item label="配置名称">
+              <j-input
+                placeholder="配置名称"
+                v-model="queryParam.name"
+                style="width: 200px"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-button style="margin-left: 8px">
+          批量操作 <a-icon type="down"
+        /></a-button>
+      </a-dropdown>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{ x: true }"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{
+          selectedRowKeys: selectedRowKeys,
+          onChange: onSelectChange,
+        }"
+        class="j-table-force-nowrap"
+        @change="handleTableChange"
+      >
+        <template slot="payFlagslot" slot-scope="text, record, index">
+          {{ record.payFlag == 1 ? "是" : "否" }}
+        </template>
+        <template slot="iconslot" slot-scope="text, record, index">
+          <a-icon :type="record.icon" theme="filled" />
+        </template>
+        <template slot="htmlSlot" slot-scope="text">
+          <div v-html="text"></div>
+        </template>
+        <template slot="imgSlot" slot-scope="text, record">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无图片</span
+          >
+          <img
+            v-else
+            :src="getImgView(text)"
+            :preview="record.id"
+            height="25px"
+            alt=""
+            style="max-width: 80px; font-size: 12px; font-style: italic"
+          />
+        </template>
+        <template slot="fileSlot" slot-scope="text">
+          <span v-if="!text" style="font-size: 12px; font-style: italic"
+            >无文件</span
+          >
+          <a-button
+            v-else
+            :ghost="true"
+            type="primary"
+            icon="download"
+            size="small"
+            @click="downloadFile(text)"
+          >
+            下载
+          </a-button>
+        </template>
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleDetail(record)">详情</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm
+                  title="确定删除吗?"
+                  @confirm="() => handleDelete(record.id)"
+                >
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+      </a-table>
+    </div>
+    <bus-market-recharge-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-recharge-modal>
+  </a-card>
+</template>
+  
+  <script>
+
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMarketRechargeModal from "./modules/BusMarketRechargeModal";
+import { filterObj } from "@/utils/util";
+import { getAction } from "@/api/manage";
+export default {
+  name: "marketRechargeList",
+  mixins: [JeecgListMixin],
+  components: {
+    BusMarketRechargeModal,
+  },
+  data() {
+    return {
+      queryParam: {},
+      // 分页参数
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ["10", "20", "30"],
+        showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条";
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0,
+      },
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "配置名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "充值金额",
+          align: "center",
+          dataIndex: "money",
+        },
+        {
+          title: "赠送金额",
+          align: "center",
+          dataIndex: "returnRoney",
+        },
+        {
+          title: "备注",
+          align: "center",
+          dataIndex: "remarks",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "business/busMarketRecharge/list",
+        delete: "business/busMarketRecharge/delete",
+        deleteBatch: "business/busMarketRecharge/deleteBatch",
+        exportXlsUrl: "business/busMarketRecharge/exportXls",
+        importExcelUrl:
+          "business/busMarketRecharge/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      selectedRowKeys: [],
+      isorter: {
+        column: "createTime",
+        order: "desc",
+      },
+    };
+  },
+  created() {
+    // this.loadData()
+  },
+  methods: {
+    // searchQuery() {
+    //   this.loadData(1);
+    // },
+    // loadData(arg) {
+    //   //加载数据 若传入参数1则加载第一页的内容
+    //   if (arg === 1) {
+    //     this.ipagination.current = 1;
+    //   }
+    //   var params = this.getQueryParams(); //查询条件
+    //   getAction(this.url.list, params).then((res) => {
+    //     if (res.success) {
+    //       this.dataSource1 = res.result.records;
+    //       this.ipagination.total = res.result.total;
+    //     }
+    //   });
+    // },
+    // getQueryParams() {
+    //   var param = Object.assign({}, this.queryParam, this.isorter);
+    //   param.pageNo = this.ipagination.current;
+    //   param.pageSize = this.ipagination.pageSize;
+    //   return filterObj(param);
+    // },
+    getAvatarView: function (avatar) {
+      return getFileAccessHttpUrl(avatar);
+    },
+
+    batchFrozen: function (status) {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return false;
+      } else {
+        let ids = "";
+        let that = this;
+        let isAdmin = false;
+        that.selectionRows.forEach(function (row) {
+          if (row.username == "admin") {
+            isAdmin = true;
+          }
+        });
+        if (isAdmin) {
+          that.$message.warning("管理员账号不允许此操作,请重新选择!");
+          return;
+        }
+        that.selectedRowKeys.forEach(function (val) {
+          ids += val + ",";
+        });
+        that.$confirm({
+          title: "确认操作",
+          content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+          onOk: function () {
+            frozenBatch({ ids: ids, status: status }).then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.loadData();
+                that.onClearSelected();
+              } else {
+                that.$message.warning(res.message);
+              }
+            });
+          },
+        });
+      }
+    },
+    handleMenuClick(e) {
+      if (e.key == 1) {
+        this.batchDel();
+      } else if (e.key == 2) {
+        this.batchFrozen(2);
+      } else if (e.key == 3) {
+        this.batchFrozen(1);
+      }
+    },
+    handleFrozen: function (id, status, username) {
+      let that = this;
+      //TODO 后台校验管理员角色
+      if ("admin" == username) {
+        that.$message.warning("管理员账号不允许此操作!");
+        return;
+      }
+      frozenBatch({ ids: id, status: status }).then((res) => {
+        if (res.success) {
+          that.$message.success(res.message);
+          that.loadData();
+        } else {
+          that.$message.warning(res.message);
+        }
+      });
+    },
+    handleChangePassword(username) {
+      this.$refs.passwordmodal.show(username);
+    },
+    passwordModalOk() {
+      //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+    },
+    onSyncFinally({ isToLocal }) {
+      // 同步到本地时刷新下数据
+      if (isToLocal) {
+        this.loadData();
+      }
+    },
+  },
+};
+</script>
+  <style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 2 - 2
src/views/settings/components/memberList.vue

@@ -6,11 +6,11 @@
         <a-row :gutter="24">
           <a-col :span="6">
             <a-form-item label="会员名称">
-              <a-input
+              <j-input
                 placeholder="会员名称"
                 v-model="queryParam.name"
                 style="width: 200px"
-              ></a-input>
+              ></j-input>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">

+ 41 - 19
src/views/settings/components/modules/BusMarketMemberForm.vue

@@ -73,7 +73,12 @@
                 style="width: 120px"
                 :allowClear="true"
               >
-                <a-select-option :value="item.value" v-for="(item,index) in roomPlans" :key="index">{{ item.label }}</a-select-option>
+                <a-select-option
+                  :value="item.value"
+                  v-for="(item, index) in roomPlans"
+                  :key="index"
+                  >{{ item.label }}</a-select-option
+                >
               </a-select>
             </a-form-model-item>
           </a-col>
@@ -90,12 +95,15 @@
               </a-radio-group>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24" v-show="model.payFlag == 1">
+          <a-col :span="24" v-if="model.payFlag == 1">
             <a-form-model-item
               label="支付费用"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
               prop="payAmount"
+              :rules="[
+                { required: true, message: '请输入支付费用', trigger: 'blur' },
+              ]"
             >
               <a-input-number
                 v-model="model.payAmount"
@@ -216,7 +224,7 @@
                   :max="1000000"
                   :precision="0"
                 />分</block
-              ><br>
+              ><br />
               <a-checkbox
                 @change="(e) => (model.roomIntegralChecked = e.target.checked)"
                 :checked="model.roomIntegralChecked"
@@ -239,7 +247,7 @@
                   :max="1000000"
                   :precision="0"
                 />分</block
-              ><br>
+              ><br />
               <a-checkbox
                 @change="(e) => (model.dayIntegralChecked = e.target.checked)"
                 :checked="model.dayIntegralChecked"
@@ -262,7 +270,7 @@
                   :max="1000000"
                   :precision="0"
                 />分</block
-              ><br>
+              ><br />
               <a-checkbox
                 @change="(e) => (model.rechargeChecked = e.target.checked)"
                 :checked="model.rechargeChecked"
@@ -285,7 +293,7 @@
                   :max="1000000"
                   :precision="0"
                 />分</block
-              ><br>
+              ><br />
               <a-checkbox
                 @change="(e) => (model.upLevelChecked = e.target.checked)"
                 :checked="model.upLevelChecked"
@@ -306,10 +314,14 @@
                   style="width: 120px"
                   :allowClear="true"
                 >
-                  <a-select-option value="jack"> Jack </a-select-option>
-                  <a-select-option value="lucy"> Lucy </a-select-option>
+                <a-select-option
+                  :value="item.value"
+                  v-for="(item, index) in members"
+                  :key="index"
+                  >{{ item.label }}</a-select-option
+                >
                 </a-select></block
-              ><br>
+              ><br />
               <a-checkbox
                 @change="(e) => (model.subLevelChecked = e.target.checked)"
                 :checked="model.subLevelChecked"
@@ -388,7 +400,7 @@
 </template>
 
 <script>
-  import {getRoomPlans} from '@/api/api'
+import { getRoomPlans,getSelectList } from "@/api/api";
 import { httpAction, getAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
 import Icons from "./icon/Icons";
@@ -406,6 +418,7 @@ export default {
   data() {
     return {
       model: {
+        id: "",
         hotelId: 0,
         type: 0,
         discount: 1,
@@ -433,7 +446,7 @@ export default {
       confirmLoading: false,
       validatorRules: {
         name: [{ required: true, message: "请输入会员名称!" }],
-        payAmount: [{ required: true, message: "请输入支付费用!" }],
+        // payAmount: [{ required: true, message: "请输入支付费用!" }],
         level: [{ required: true, message: "请输入等级!" }],
         icon: [{ required: true, message: "请上传会员图标!" }],
       },
@@ -443,7 +456,8 @@ export default {
         queryById: "/org.jeecg.modules.business/busMarketMember/queryById",
       },
       iconChooseVisible: false,
-      roomPlans:[]
+      roomPlans: [],
+      members: [],
     };
   },
   computed: {
@@ -455,18 +469,18 @@ export default {
     var _info = JSON.parse(localStorage.getItem("storeInfo"));
     if (_info) {
       this.model.hotelId = _info.id;
-      this.initData()
+      this.initData();
     }
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
-
   },
   methods: {
-    initData(){
+    initData() {
       getRoomPlans(this.model.hotelId, null).then((res) => {
-          if (res.success) {
-            this.roomPlans = res.result;
-          }
-        })
+        if (res.success) {
+          this.roomPlans = res.result;
+        }
+      });
+
     },
     selectIcons() {
       this.iconChooseVisible = true;
@@ -485,6 +499,11 @@ export default {
     edit(record) {
       this.model = Object.assign({}, record);
       this.visible = true;
+      getSelectList({ id: this.model.id }).then((res) => {
+        if (res.success) {
+          this.members = res.result;
+        }
+      });
     },
     submitForm() {
       const that = this;
@@ -501,6 +520,9 @@ export default {
             httpurl += this.url.edit;
             method = "put";
           }
+          if (this.model.payFlag == 0) {
+            this.model.payAmount = 0;
+          }
           httpAction(httpurl, this.model, method)
             .then((res) => {
               if (res.success) {

+ 129 - 0
src/views/settings/components/modules/BusMarketMemberGroupForm.vue

@@ -0,0 +1,129 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="关联租户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item
+              label="名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input v-model="model.name" placeholder="请输入名称"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMarketMemberGroupForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入名称!" }],
+      },
+      url: {
+        add: "/business/busMarketMemberGroup/add",
+        edit: "/business/busMarketMemberGroup/edit",
+        queryById: "/business/busMarketMemberGroup/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 84 - 0
src/views/settings/components/modules/BusMarketMemberGroupModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-market-member-group-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-market-member-group-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import BusMarketMemberGroupForm from './BusMarketMemberGroupForm'
+
+  export default {
+    name: 'BusMarketMemberGroupModal',
+    components: {
+      BusMarketMemberGroupForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/settings/components/modules/BusMarketMemberGroupModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-market-member-group-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-member-group-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketMemberGroupForm from './BusMarketMemberGroupForm'
+  export default {
+    name: 'BusMarketMemberGroupModal',
+    components: {
+      BusMarketMemberGroupForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 129 - 0
src/views/settings/components/modules/BusMarketMemberLableForm.vue

@@ -0,0 +1,129 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="关联租户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item
+              label="名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input v-model="model.name" placeholder="请输入名称"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMarketMemberLableForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入名称!" }],
+      },
+      url: {
+        add: "/business/busMarketMemberLable/add",
+        edit: "/business/busMarketMemberLable/edit",
+        queryById: "/business/busMarketMemberLable/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 84 - 0
src/views/settings/components/modules/BusMarketMemberLableModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-market-member-lable-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-market-member-lable-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import BusMarketMemberLableForm from './BusMarketMemberLableForm'
+
+  export default {
+    name: 'BusMarketMemberLableModal',
+    components: {
+      BusMarketMemberLableForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/settings/components/modules/BusMarketMemberLableModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-market-member-lable-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-member-lable-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketMemberLableForm from './BusMarketMemberLableForm'
+  export default {
+    name: 'BusMarketMemberLableModal',
+    components: {
+      BusMarketMemberLableForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 175 - 0
src/views/settings/components/modules/BusMarketRechargeForm.vue

@@ -0,0 +1,175 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+        slot="detail"
+      >
+        <a-row>
+          <!-- <a-col :span="24">
+            <a-form-model-item label="关联租户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
+              <a-input v-model="model.tenantId" placeholder="请输入关联租户"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="关联酒店" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hotelId">
+              <a-input v-model="model.hotelId" placeholder="请输入关联酒店"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item
+              label="充值名称"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="请输入充值名称"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="充值金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="money"
+            >
+              <a-input-number
+                v-model="model.money"
+                placeholder="请输入充值金额"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="赠送金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="returnRoney"
+            >
+              <a-input-number
+                v-model="model.returnRoney"
+                placeholder="请输入赠送金额"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="备注信息"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remarks"
+            >
+              <a-input
+                v-model="model.remarks"
+                placeholder="请输入备注信息"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMarketRechargeForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        tenantId: [{ required: true, message: "请输入关联租户!" }],
+        hotelId: [{ required: true, message: "请输入关联酒店!" }],
+        name: [{ required: true, message: "请输入充值名称!" }],
+        money: [{ required: true, message: "请输入充值金额!" }],
+        returnRoney: [{ required: true, message: "请输入赠送金额!" }],
+      },
+      url: {
+        add: "/business/busMarketRecharge/add",
+        edit: "/business/busMarketRecharge/edit",
+        queryById: "/business/busMarketRecharge/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 84 - 0
src/views/settings/components/modules/BusMarketRechargeModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-market-recharge-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-market-recharge-form>
+    <div class="drawer-footer">
+      <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
+      <a-button v-if="!disableSubmit"  @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
+    </div>
+  </a-drawer>
+</template>
+
+<script>
+
+  import BusMarketRechargeForm from './BusMarketRechargeForm'
+
+  export default {
+    name: 'BusMarketRechargeModal',
+    components: {
+      BusMarketRechargeForm
+    },
+    data () {
+      return {
+        title:"操作",
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        });
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+/** Button按钮间距 */
+  .ant-btn {
+    margin-left: 30px;
+    margin-bottom: 30px;
+    float: right;
+  }
+  .drawer-footer{
+    position: absolute;
+    bottom: -8px;
+    width: 100%;
+    border-top: 1px solid #e8e8e8;
+    padding: 10px 16px;
+    text-align: right;
+    left: 0;
+    background: #fff;
+    border-radius: 0 0 2px 2px;
+  }
+</style>

+ 60 - 0
src/views/settings/components/modules/BusMarketRechargeModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-market-recharge-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-recharge-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketRechargeForm from './BusMarketRechargeForm'
+  export default {
+    name: 'BusMarketRechargeModal',
+    components: {
+      BusMarketRechargeForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 7 - 4
src/views/settings/marketMemberList.vue

@@ -11,11 +11,13 @@
               <span slot="tab">
                   充值配置
               </span>
+              <market-recharge-list></market-recharge-list>
           </a-tab-pane>
           <a-tab-pane key="3">
               <span slot="tab">
                   会员配置
               </span>
+              <bus-market-member-lable-list></bus-market-member-lable-list>
           </a-tab-pane>
           <a-tab-pane key="4">
               <span slot="tab">
@@ -28,13 +30,14 @@
 
 <script>
 import memberList from './components/memberList.vue';
-import storeAuthInfo from './components/storeAuthInfo.vue';
-import storeInfos from './components/storeInfos.vue';
+import marketRechargeList from './components/marketRechargeList.vue';
+import BusMarketMemberLableList from './components/BusMarketMemberLableList.vue';
+
 export default {
   components:{
     memberList,
-      storeAuthInfo,
-      storeInfos
+    marketRechargeList,
+    BusMarketMemberLableList
   },
   data() {
       return {