Bläddra i källkod

Merge branch 'master' of http://49.4.53.36:3000/hotel/hotel-saas-tenant-frontend

qh 2 år sedan
förälder
incheckning
5aa9c9151c
39 ändrade filer med 4308 tillägg och 61 borttagningar
  1. 7 0
      src/utils/excloudHotelIdParamPath/MemeberController.js
  2. 2 1
      src/utils/excloudHotelIdParamPath/index.js
  3. 6 4
      src/views/markets/coupons.vue
  4. 352 0
      src/views/markets/couponscash.vue
  5. 4 4
      src/views/markets/marketInfo.vue
  6. 751 0
      src/views/markets/member.vue
  7. 365 0
      src/views/markets/memberrecharge.vue
  8. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsForm.vue
  9. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsModal.Style#Drawer.vue
  10. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsModal.vue
  11. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsUsedForm.vue
  12. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsUsedGenerateForm.vue
  13. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsUsedGenerateFormModal.vue
  14. 1 2
      src/views/markets/modules/BusMarketCouponsUsedList.vue
  15. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsUsedListModal.vue
  16. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsUsedModal.Style#Drawer.vue
  17. 0 0
      src/views/markets/modules/coupons/BusMarketCouponsUsedModal.vue
  18. 286 0
      src/views/markets/modules/couponsCash/BusMarketCouponsCashForm.vue
  19. 60 0
      src/views/markets/modules/couponsCash/BusMarketCouponsCashModal.vue
  20. 145 0
      src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedGenerateForm.vue
  21. 60 0
      src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedGenerateFormModal.vue
  22. 61 25
      src/views/markets/modules/Provide/UserList.vue
  23. 64 0
      src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedListModal.vue
  24. 352 0
      src/views/markets/modules/couponsProvide/BusMemberCardList.vue
  25. 10 5
      src/views/markets/modules/Provide/MobileForm.vue
  26. 23 16
      src/views/markets/modules/Provide/index.vue
  27. 316 0
      src/views/markets/modules/memberBalance/BusMemberBalanceLogForm.vue
  28. 84 0
      src/views/markets/modules/memberBalance/BusMemberBalanceLogModal.Style#Drawer.vue
  29. 60 0
      src/views/markets/modules/memberBalance/BusMemberBalanceLogModal.vue
  30. 286 0
      src/views/markets/modules/memberCard/BusMemberCardForm.vue
  31. 84 0
      src/views/markets/modules/memberCard/BusMemberCardModal.Style#Drawer.vue
  32. 60 0
      src/views/markets/modules/memberCard/BusMemberCardModal.vue
  33. 170 0
      src/views/markets/modules/memberPoint/BusMemberPointLogForm.vue
  34. 84 0
      src/views/markets/modules/memberPoint/BusMemberPointLogModal.Style#Drawer.vue
  35. 60 0
      src/views/markets/modules/memberPoint/BusMemberPointLogModal.vue
  36. 208 0
      src/views/settings/components/modules/printTemplateForm.vue
  37. 84 0
      src/views/settings/components/modules/printTemplateModal.Style#Drawer.vue
  38. 60 0
      src/views/settings/components/modules/printTemplateModal.vue
  39. 203 4
      src/views/settings/components/printTemplate.vue

+ 7 - 0
src/utils/excloudHotelIdParamPath/MemeberController.js

@@ -0,0 +1,7 @@
+export default {
+    name: '会员管理模块',
+    excloudUrls: [
+        '/business/busMemberCard/list',
+        '/business/busMemberBalanceLog/list'
+    ]
+}

+ 2 - 1
src/utils/excloudHotelIdParamPath/index.js

@@ -1,5 +1,6 @@
 import CesRoomLayoutPrice from './CesRoomLayoutPriceController'
-
+import MemeberController from './MemeberController'
 export default [
     ...CesRoomLayoutPrice.excloudUrls,
+    ...MemeberController.excloudUrls
 ]

+ 6 - 4
src/views/markets/coupons.vue

@@ -46,7 +46,7 @@
 
     <!-- 操作按钮区域 -->
     <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+      <a-button @click="handleAdd" type="danger" icon="plus">新增</a-button>
       <!-- <a-button type="primary" icon="download" @click="handleExportXls('bus_market_coupons_info')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
@@ -151,9 +151,9 @@
 import "@/assets/less/TableExpand.less";
 import { mixinDevice } from "@/utils/mixin";
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
-import BusMarketCouponsModal from "./modules/BusMarketCouponsModal";
-import BusMarketCouponsUsedListModal from "./modules/BusMarketCouponsUsedListModal";
-import ProvideIndexModal from "./modules/Provide/index";
+import BusMarketCouponsModal from "./modules/coupons/BusMarketCouponsModal";
+import BusMarketCouponsUsedListModal from "./modules/coupons/BusMarketCouponsUsedListModal";
+import ProvideIndexModal from "./modules/couponsProvide/index";
 import { deleteAction } from "@/api/manage";
 export default {
   name: "coupons",
@@ -299,12 +299,14 @@ export default {
       this.couponsId = item.id;
       this.$refs.modalProvideIndexModal.visible = true;
       this.$refs.modalProvideIndexModal.title = "发放";
+      this.$refs.modalProvideIndexModal.disableSubmit = true;
     },
     handleConfig(item) {
       this.couponsId = item.id;
       // this.$refs.modalCouponsUsedListModal.eventId = item.id;
       this.$refs.modalCouponsUsedListModal.visible = true;
       this.$refs.modalCouponsUsedListModal.title = "详情";
+      this.$refs.modalCouponsUsedListModal.disableSubmit = true;
       this.$refs.modalCouponsUsedListModal.add(item.id);
     },
     searchReset() {

+ 352 - 0
src/views/markets/couponscash.vue

@@ -0,0 +1,352 @@
+<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="4">
+            <a-form-item label="">
+              <a-input
+                placeholder="优惠券名称"
+                v-model="queryParam.name"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['开始日期', '结束日期']"
+                @change="onChange"
+                v-model="datetime"
+              />
+            </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="danger" icon="plus">新增</a-button>
+      <!-- <a-button type="primary" icon="download" @click="handleExportXls('bus_market_coupons_info')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <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="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="handleConfig(record)">详情</a>
+          <a-divider type="vertical" />
+          <a @click="handleProvide(record)">发放</a>
+          <a-divider type="vertical" />
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical" />
+          <a @click="handleDelete(record.id)">删除</a>
+        </span>
+      </a-table>
+    </div>
+
+    <bus-market-coupons-cash-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-coupons-cash-modal>
+    <bus-market-coupons-cash-used-list-modal
+      ref="modalCouponsCashUsedListModal"
+      :couponsId="couponsId"
+    ></bus-market-coupons-cash-used-list-modal>
+
+    <provide-index-modal
+      ref="modalProvideIndexModal"
+      :couponsId="couponsId"
+      :couponsType="2"
+      @ok="modalFormOk"
+    ></provide-index-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMarketCouponsCashModal from "./modules/couponsCash/BusMarketCouponsCashModal";
+import BusMarketCouponsCashUsedListModal from "./modules/couponsCash/BusMarketCouponsCashUsedListModal";
+import ProvideIndexModal from "./modules/couponsProvide/index";
+import { deleteAction } from "@/api/manage";
+export default {
+  name: "coupons",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMarketCouponsCashModal,
+    BusMarketCouponsCashUsedListModal,
+    ProvideIndexModal,
+  },
+  data() {
+    return {
+      couponsId: "",
+      datetime: [],
+      queryParam: {},
+      description: "bus_market_coupons_info管理页面",
+      // 表头
+      columns: [
+        // {
+        //   title: "#",
+        //   dataIndex: "",
+        //   key: "rowIndex",
+        //   width: 60,
+        //   align: "center",
+        //   customRender: function (t, r, index) {
+        //     return parseInt(index) + 1;
+        //   },
+        // },
+        // {
+        //   title: "关联租户",
+        //   align: "center",
+        //   dataIndex: "tenantId",
+        // },
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "名称",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "开始时间",
+          align: "center",
+          dataIndex: "startTime",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "结束时间",
+          align: "center",
+          dataIndex: "endTime",
+          customRender: function (text) {
+            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          },
+        },
+        {
+          title: "优惠条件",
+          align: "center",
+          dataIndex: "type",
+          customRender: function (text, record) {
+            return text == 1 ? "无限制" : "满" + record.conditions + "可使用";
+          },
+        },
+        {
+          title: "生成数量",
+          align: "center",
+          dataIndex: "count",
+        },
+        {
+          title: "待领取",
+          align: "center",
+          dataIndex: "notClaimed",
+        },
+        {
+          title: "已领取",
+          align: "center",
+          dataIndex: "received",
+        },
+        {
+          title: "已使用",
+          align: "center",
+          dataIndex: "used",
+        },
+        {
+          title: "已作废",
+          align: "center",
+          dataIndex: "voided",
+        },
+        {
+          title: "每人可领取张数",
+          align: "center",
+          dataIndex: "klqzs",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMarketCouponsCash/list",
+        delete: "/business/busMarketCouponsCash/delete",
+        deleteBatch: "/business/busMarketCouponsCash/deleteBatch",
+        exportXlsUrl: "/business/busMarketCouponsCash/exportXls",
+        importExcelUrl: "business/busMarketCouponsCash/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    // this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleDelete: function (id) {
+      if (!this.url.delete) {
+        this.$message.error("请设置url.delete属性!");
+        return;
+      }
+      var that = this;
+      this.$confirm({
+        title: "确认删除",
+        content: "是否删除?",
+        onOk: function () {
+          deleteAction(that.url.delete, { id: id }).then((res) => {
+            if (res.success) {
+              //重新计算分页问题
+              that.reCalculatePage(1);
+              that.$message.success(res.message);
+              that.loadData();
+            } else {
+              that.$message.warning(res.message);
+            }
+          });
+        },
+        onCancel: function () {},
+      });
+    },
+    handleProvide(item) {
+      this.couponsId = item.id;
+      this.$refs.modalProvideIndexModal.visible = true;
+      this.$refs.modalProvideIndexModal.title = "发放";
+      this.$refs.modalProvideIndexModal.disableSubmit = true;
+    },
+    handleConfig(item) {
+      this.couponsId = item.id;
+      this.$refs.modalCouponsCashUsedListModal.visible = true;
+      this.$refs.modalCouponsCashUsedListModal.title = "详情";
+      this.$refs.modalCouponsCashUsedListModal.disableSubmit = true;
+      this.$refs.modalCouponsCashUsedListModal.add(item.id);
+    },
+    searchReset() {
+      this.datetime = [];
+      this.queryParam = {};
+      this.loadData(1);
+    },
+    onChange(e, dateString) {
+      // console.log("Selected Time: ", e);
+      // console.log("Formatted Selected Time: ", dateString);
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "name", text: "名称" });
+      fieldList.push({ type: "date", value: "startTime", text: "开始时间" });
+      fieldList.push({ type: "date", value: "endTime", text: "结束时间" });
+      fieldList.push({ type: "string", value: "tenantId", text: "适用房型" });
+      fieldList.push({ type: "int", value: "klqzs", text: "可领取张数" });
+      fieldList.push({ type: "string", value: "type", text: "类型" });
+      fieldList.push({ type: "string", value: "introduce", text: "说明" });
+      fieldList.push({ type: "int", value: "lqNum", text: "领取数量" });
+      fieldList.push({ type: "string", value: "ruleDec", text: "使用说明" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 4 - 4
src/views/markets/marketInfo.vue

@@ -3,14 +3,14 @@
     <p>会员分组设置</p>
     <a-divider />
     <div class="space-align-container">
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/member')">
         <img
           src="http://oss.qlan99.com/20200529/733024169836404bb2db66450167dd06.png"
         />
         <p>会员列表</p>
       </div>
 
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/memberrecharge')">
         <img
           src="http://oss.qlan99.com/20200529/4446ad625b404d64ac67494266d2452b.png"
           width="50"
@@ -39,7 +39,7 @@
         />
         <p>餐券核销</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/couponscash')">
         <img
           src="http://oss.qlan99.com/20200529/7a270d9a3a534034ac03c2fdd23139ab.png"
         />
@@ -81,7 +81,7 @@ export default {
   methods: {
     toPage(url) {
       if(!url){
-        this.$message.warning('开发中,请先体验免房券');
+        this.$message.warning('开发中,请先体验免房券/优惠券');
         return
       }
       this.$router.push(url);

+ 751 - 0
src/views/markets/member.vue

@@ -0,0 +1,751 @@
+<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="3">
+            <a-form-item label="">
+              <a-select
+                mode="multiple"
+                style="width: 180px"
+                placeholder="商家名称"
+                :maxTagCount="1"
+                :maxTagTextLength="50"
+                v-model="queryParam.hotelIds"
+              >
+                <a-select-option
+                  v-for="(item, index) in hotelList"
+                  :key="index"
+                  :value="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员名称"
+                v-model="queryParam.name"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员手机号"
+                v-model="queryParam.mobile"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员卡号"
+                v-model="queryParam.cardNo"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model:value="queryParam.gradeId"
+                style="width: 100%"
+                placeholder="会员等级"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in gradeList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model:value="queryParam.groupId"
+                style="width: 100%"
+                placeholder="会员分组"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in groupList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <a-select
+                v-model:value="queryParam.labelId"
+                style="width: 100%"
+                placeholder="会员标签"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in labelList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['注册开始日期', '注册结束日期']"
+                @change="onChange"
+                v-model="datetime"
+              />
+            </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"
+      style="display: flex; justify-content: space-between"
+    >
+      <div>
+        <a-button @click="handleAdd" type="primary" icon="plus">办卡</a-button>
+        <a-button @click="batchDel" type="danger" icon="minus"
+          >批量删除</a-button
+        >
+        <!-- <a-button
+          type="primary"
+          icon="download"
+          @click="handleExportXls('bus_market_coupons_info')"
+          >导出</a-button
+        >
+        <a-upload
+          name="file"
+          :showUploadList="false"
+          :multiple="false"
+          :headers="tokenHeader"
+          :action="importExcelUrl"
+          @change="handleImportExcel"
+        >
+          <a-button type="primary" icon="import">导入</a-button>
+        </a-upload> -->
+      </div>
+      <div>
+        <a-switch @change="onSwitchChange" />
+      </div>
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
+      </a-dropdown>-->
+    </div>
+    <div v-show="showCard">
+      <a-row :gutter="24">
+        <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+          <div class="ant-card ant-card-h">
+            <div class="ant-card-body" style="padding: 20px 24px 8px">
+              <div class="chart-card-header">
+                <div class="meta">
+                  <span class="chart-card-title">今日过生日的会员</span>
+                </div>
+                <div class="total" style="color: #ff5400">
+                  <span>{{ stat.birthdayCount || 0 }}</span
+                  ><span style="font-size: 15px">位</span>
+                </div>
+              </div>
+              <div class="chart-card-content">
+                <div class="content-fix">
+                  <div>
+                    <div style="margin-right: 16px">
+                      本月还有<span style="color: #ff5400">{{
+                        stat.monthBirthdayCount || 0
+                      }}</span
+                      >位会员生日
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </a-col>
+
+        <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+          <div class="ant-card ant-card-h">
+            <div class="ant-card-body" style="padding: 20px 24px 8px">
+              <div class="chart-card-header">
+                <div class="meta">
+                  <span class="chart-card-title">会员总数</span>
+                </div>
+                <div class="total" style="color: #ff5400">
+                  <span>{{ stat.count || 0 }}</span
+                  ><span style="font-size: 15px">位</span>
+                </div>
+              </div>
+              <div class="chart-card-content">
+                <div class="content-fix">
+                  <div>
+                    <div style="margin-right: 16px">
+                      今日新增<span style="color: #ff5400">{{
+                        stat.dayCount || 0
+                      }}</span
+                      >位会员
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </a-col>
+
+        <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+          <div class="ant-card ant-card-h">
+            <div class="ant-card-body" style="padding: 20px 24px 8px">
+              <div class="chart-card-header">
+                <div class="meta">
+                  <span class="chart-card-title">累计消费</span>
+                </div>
+                <div class="total" style="color: #ff5400">
+                  <span>0.00</span><span style="font-size: 15px">元</span>
+                </div>
+              </div>
+              <div class="chart-card-content">
+                <div class="content-fix">
+                  <div>
+                    <div style="margin-right: 16px">
+                      今日已有<span style="color: #ff5400">0</span
+                      >位会员消费<span style="color: #ff5400">0.00</span>元
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </a-col>
+
+        <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
+          <div class="ant-card ant-card-h">
+            <div class="ant-card-body" style="padding: 20px 24px 8px">
+              <div class="chart-card-header">
+                <div class="meta">
+                  <span class="chart-card-title">消费会员(TOP3)</span>
+                </div>
+              </div>
+              <div class="chart-card-content">
+                <div class="content-fix">
+                  <div>
+                    <div style="margin-right: 16px">暂无</div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </a-col>
+      </a-row>
+    </div>
+    <!-- table区域-begin -->
+    <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="avatar" slot-scope="text">
+          <a-avatar v-if="text" :src="text" />
+          <a-avatar v-else icon="user" />
+        </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="handlePointEdit(record)">积分调整</a>
+          <a-divider type="vertical" />
+          <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>
+      <a-select
+        style="width: 200px"
+        placeholder="请选择会员分组"
+        :disabled="selectedRowKeys.length <= 0"
+        v-model="groupId"
+        @change="groupChange"
+      >
+        <a-select-option
+          v-for="(item, index) in groupList"
+          :key="index"
+          :value="item.id"
+          >{{ item.name }}</a-select-option
+        >
+      </a-select>
+      <a-select
+        style="width: 200px; margin-left: 10px"
+        placeholder="请选择会员标签"
+        :disabled="selectedRowKeys.length <= 0"
+        v-model="labelId"
+        @change="labelChange"
+      >
+        <a-select-option
+          v-for="(item, index) in labelList"
+          :key="index"
+          :value="item.id"
+          >{{ item.name }}</a-select-option
+        >
+      </a-select>
+    </div>
+    <bus-member-card-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-member-card-modal>
+    <bus-member-point-log-modal
+      ref="modalMemberPointLogForm"
+      @ok="modalFormOk"
+    ></bus-member-point-log-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction } from "@/api/manage";
+import BusMemberCardModal from "./modules/memberCard/BusMemberCardModal";
+import BusMemberPointLogModal from "./modules/memberPoint/BusMemberPointLogModal";
+
+const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMemberCardModal,
+    BusMemberPointLogModal,
+  },
+  data() {
+    return {
+      showCard: false,
+      groupId: undefined,
+      labelId: undefined,
+      description: "会员页面",
+      datetime: [],
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "头像",
+          align: "center",
+          dataIndex: "avatar",
+          scopedSlots: { customRender: "avatar" },
+        },
+        {
+          title: "会员姓名",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "性别",
+          align: "center",
+          dataIndex: "sex",
+          customRender: function (text) {
+            return text === 1 ? "男" : "女";
+          },
+        },
+        {
+          title: "会员卡号",
+          align: "center",
+          dataIndex: "cardNo",
+        },
+        {
+          title: "等级类型",
+          align: "center",
+          dataIndex: "gradeName",
+        },
+        {
+          title: "证件号",
+          align: "center",
+          dataIndex: "certificateNo",
+        },
+        {
+          title: "创建日期",
+          align: "center",
+          dataIndex: "createTime",
+        },
+        {
+          title: "推荐员工",
+          align: "center",
+          dataIndex: "staffId",
+        },
+        {
+          title: "可用积分",
+          align: "center",
+          dataIndex: "integral",
+          customRender: function (text) {
+            return text || 0;
+          },
+        },
+        {
+          title: "可用余额",
+          align: "center",
+          dataIndex: "balance",
+          customRender: function (text) {
+            return text || 0;
+          },
+        },
+        {
+          title: "标签",
+          align: "center",
+          dataIndex: "labelName",
+        },
+        {
+          title: "分组",
+          align: "center",
+          dataIndex: "groupName",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list:
+          hotelInfo && hotelInfo.id
+            ? "/business/busMemberCard/list?hotelId=" + hotelInfo.id
+            : "/business/busMemberCard/list",
+        delete: "/business/busMemberCard/delete",
+        deleteBatch: "/business/busMemberCard/deleteBatch",
+        exportXlsUrl: "/business/busMemberCard/exportXls",
+        importExcelUrl: "business/busMemberCard/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+      gradeList: [],
+      groupList: [],
+      labelList: [],
+      stat: {},
+    };
+  },
+  created() {
+    // this.getSuperFieldList();
+    httpAction(
+      "/business/busHotel/list",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.hotelList = res.result.records;
+      }
+    });
+    httpAction(
+      "/org.jeecg.modules.business/busMarketMember/list",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.gradeList = res.result.records;
+      }
+    });
+    httpAction(
+      "/business/busMarketMemberGroup/list",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.groupList = res.result.records;
+      }
+    });
+    httpAction(
+      "/business/busMarketMemberLable/list",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.labelList = res.result.records;
+      }
+    });
+    httpAction("/business/busMemberCard/stat", {}, "get").then((res) => {
+      if (res.success) {
+        this.stat = res.result;
+      }
+    });
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    searchQuery() {
+      if (this.queryParam.hotelIds && this.queryParam.hotelIds.length > 0) {
+        this.url.list = "/business/busMemberCard/list";
+      } else {
+        this.url.list = "/business/busMemberCard/list?hotelId=" + hotelInfo.id;
+      }
+      this.loadData(1);
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+    },
+    handlePointEdit(item) {
+      this.$refs.modalMemberPointLogForm.add({
+        memberId: item.id,
+        hotelId: item.hotelId,
+        tenantId: item.tenantId,
+        integral: item.integral,
+        cardNo: item.cardNo,
+        name: item.name,
+      });
+      this.$refs.modalMemberPointLogForm.title = "积分调整";
+      this.$refs.modalMemberPointLogForm.disableSubmit = false;
+    },
+    groupChange(e) {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return;
+      }
+      var that = this;
+      httpAction(
+        "/business/busMemberCard/groupBatch",
+        {
+          groupId: e,
+          ids: this.selectedRowKeys,
+        },
+        "post"
+      )
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.groupId = undefined;
+            that.modalFormOk();
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    labelChange(e) {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return;
+      }
+      var that = this;
+      httpAction(
+        "/business/busMemberCard/lableBatch",
+        {
+          labelId: e,
+          ids: this.selectedRowKeys,
+        },
+        "post"
+      )
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.labelId = undefined;
+            that.modalFormOk();
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {});
+    },
+    searchReset() {
+      this.datetime = [];
+      this.queryParam = {};
+      this.loadData(1);
+    },
+    onChange(e, dateString) {
+      // console.log("Selected Time: ", e);
+      // console.log("Formatted Selected Time: ", dateString);
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    onSwitchChange(e) {
+      console.log(e);
+      this.showCard = e;
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "mobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "cardNo", text: "会员卡号" });
+      fieldList.push({ type: "string", value: "cardInnerNo", text: "卡内码" });
+      fieldList.push({ type: "string", value: "gradeId", text: "等级类型" });
+      fieldList.push({ type: "number", value: "memberFee", text: "会员费" });
+      fieldList.push({ type: "int", value: "payType", text: "付款类型" });
+      fieldList.push({ type: "int", value: "paymentMethod", text: "付款方式" });
+      fieldList.push({ type: "string", value: "name", text: "会员姓名" });
+      fieldList.push({ type: "string", value: "avatar", text: "头像" });
+      fieldList.push({ type: "int", value: "sex", text: "性别" });
+      fieldList.push({
+        type: "int",
+        value: "certificateType",
+        text: "证件类型",
+      });
+      fieldList.push({
+        type: "string",
+        value: "certificateNo",
+        text: "证件号",
+      });
+      fieldList.push({ type: "string", value: "address", text: "地址" });
+      fieldList.push({
+        type: "string",
+        value: "consumePassword",
+        text: "消费密码",
+      });
+      fieldList.push({ type: "int", value: "validity", text: "有效期" });
+      fieldList.push({
+        type: "date",
+        value: "validityEndTime",
+        text: "有效期截止日期",
+      });
+      fieldList.push({ type: "string", value: "remark", text: "备注" });
+      fieldList.push({ type: "string", value: "staffId", text: "推荐员工" });
+      fieldList.push({ type: "int", value: "integral", text: "可用积分" });
+      fieldList.push({ type: "number", value: "balance", text: "可用余额" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+/deep/ .ant-input-search-button {
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled]:hover {
+  opacity: 0.7;
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled] {
+  opacity: 0.7;
+  color: #ffffff;
+}
+.ant-card-h {
+  border: 1px solid #e8e8e8;
+  height: 150px;
+}
+.total {
+  overflow: hidden;
+  text-overflow: ellipsis;
+  word-break: break-all;
+  white-space: nowrap;
+  color: #000;
+  margin-top: 4px;
+  margin-bottom: 0;
+  font-size: 30px;
+  line-height: 38px;
+  height: 38px;
+}
+.chart-card-content {
+  margin-bottom: 12px;
+  position: relative;
+  height: 46px;
+  width: 100%;
+}
+.chart-card-content .content-fix {
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+}
+</style>
+

+ 365 - 0
src/views/markets/memberrecharge.vue

@@ -0,0 +1,365 @@
+<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="3">
+            <a-form-item label="">
+              <a-select
+                mode="multiple"
+                style="width: 180px"
+                placeholder="商家名称"
+                :maxTagCount="1"
+                :maxTagTextLength="50"
+                v-model="queryParam.hotelIds"
+              >
+                <a-select-option
+                  v-for="(item, index) in hotelList"
+                  :key="index"
+                  :value="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员名称"
+                v-model="queryParam.name"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员手机号"
+                v-model="queryParam.mobile"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="3">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员卡号"
+                v-model="queryParam.cardNo"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <a-range-picker
+                format="YYYY-MM-DD"
+                :placeholder="['开始日期', '注结束日期']"
+                @change="onChange"
+                v-model="datetime"
+              />
+            </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-button type="primary" icon="download" @click="handleExportXls('bus_member_balance_log')">导出</a-button>
+      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
+        <a-button type="primary" icon="import">导入</a-button>
+      </a-upload> -->
+      <!-- 高级查询区域 -->
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-menu slot="overlay">
+          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
+        </a-menu>
+        <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="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-member-balance-log-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-member-balance-log-modal>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMemberBalanceLogModal from "./modules/memberBalance/BusMemberBalanceLogModal";
+import { httpAction } from "@/api/manage";
+const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+  name: "BusMemberBalanceLogList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMemberBalanceLogModal,
+  },
+  data() {
+    return {
+      description: "bus_member_balance_log管理页面",
+      datetime: [],
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "memberName",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "会员卡号",
+          align: "center",
+          dataIndex: "cardNo",
+        },
+        {
+          title: "流水号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "充值金额",
+          align: "center",
+          dataIndex: "money",
+          customRender: function (text, record) {
+            return record.type === 1 ? "+" + text : "-" + text;
+          },
+        },
+        {
+          title: "赠送金额",
+          align: "center",
+          dataIndex: "giveMoney",
+          customRender: function (text, record) {
+            return text > 0 ? "+" + text : "-";
+          },
+        },
+        {
+          title: "支付金额",
+          align: "center",
+          dataIndex: "payMoney",
+        },
+        {
+          title: "支付方式",
+          align: "center",
+          dataIndex: "paymentMethodName",
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "status",
+          customRender: function (text, record) {
+            return text == 1 ? "已支付" : "未支付";
+          },
+        },
+        {
+          title: "备注",
+          align: "center",
+          dataIndex: "remarks",
+        },
+        {
+          title: "推荐员工",
+          align: "center",
+          dataIndex: "staffId",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list:
+          hotelInfo && hotelInfo.id
+            ? "/business/busMemberBalanceLog/list?hotelId=" + hotelInfo.id
+            : "/business/busMemberBalanceLog/list",
+        delete: "/business/busMemberBalanceLog/delete",
+        deleteBatch: "/business/busMemberBalanceLog/deleteBatch",
+        exportXlsUrl: "/business/busMemberBalanceLog/exportXls",
+        importExcelUrl: "business/busMemberBalanceLog/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      hotelList: [],
+    };
+  },
+  created() {
+    // this.getSuperFieldList();
+    httpAction(
+      "/business/busHotel/list",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.hotelList = res.result.records;
+      }
+    });
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    searchQuery() {
+      if (this.queryParam.hotelIds && this.queryParam.hotelIds.length > 0) {
+        this.url.list = "/business/busMemberBalanceLog/list";
+      } else {
+        this.url.list =
+          "/business/busMemberBalanceLog/list?hotelId=" + hotelInfo.id;
+      }
+      this.loadData(1);
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+    },
+    searchReset() {
+      this.datetime = [];
+      this.queryParam = {};
+      this.loadData(1);
+    },
+    onChange(e, dateString) {
+      // console.log("Selected Time: ", e);
+      // console.log("Formatted Selected Time: ", dateString);
+      this.queryParam.startTime = dateString[0];
+      this.queryParam.endTime = dateString[1];
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "memberId", text: "会员id" });
+      fieldList.push({ type: "int", value: "type", text: "类型" });
+      fieldList.push({ type: "number", value: "money", text: "充值金额" });
+      fieldList.push({ type: "number", value: "balance", text: "金额余额" });
+      fieldList.push({ type: "number", value: "giveMoney", text: "赠送金额" });
+      fieldList.push({ type: "string", value: "remarks", text: "备注" });
+      fieldList.push({ type: "string", value: "staffId", text: "推荐员工" });
+      fieldList.push({
+        type: "string",
+        value: "paymentMethod",
+        text: "支付方式",
+      });
+      fieldList.push({ type: "number", value: "payMoney", text: "支付金额" });
+      fieldList.push({ type: "string", value: "code", text: "流水号" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

src/views/markets/modules/BusMarketCouponsForm.vue → src/views/markets/modules/coupons/BusMarketCouponsForm.vue


src/views/markets/modules/BusMarketCouponsModal.Style#Drawer.vue → src/views/markets/modules/coupons/BusMarketCouponsModal.Style#Drawer.vue


src/views/markets/modules/BusMarketCouponsModal.vue → src/views/markets/modules/coupons/BusMarketCouponsModal.vue


src/views/markets/modules/BusMarketCouponsUsedForm.vue → src/views/markets/modules/coupons/BusMarketCouponsUsedForm.vue


src/views/markets/modules/BusMarketCouponsUsedGenerateForm.vue → src/views/markets/modules/coupons/BusMarketCouponsUsedGenerateForm.vue


src/views/markets/modules/BusMarketCouponsUsedGenerateFormModal.vue → src/views/markets/modules/coupons/BusMarketCouponsUsedGenerateFormModal.vue


+ 1 - 2
src/views/markets/modules/BusMarketCouponsUsedList.vue

@@ -57,8 +57,7 @@
               >
               <a-button
                 @click="handleAdd"
-                type="primary"
-                icon="plus"
+                type="danger"
                 style="margin-left: 8px"
                 >生成免房券</a-button
               >

src/views/markets/modules/BusMarketCouponsUsedListModal.vue → src/views/markets/modules/coupons/BusMarketCouponsUsedListModal.vue


src/views/markets/modules/BusMarketCouponsUsedModal.Style#Drawer.vue → src/views/markets/modules/coupons/BusMarketCouponsUsedModal.Style#Drawer.vue


src/views/markets/modules/BusMarketCouponsUsedModal.vue → src/views/markets/modules/coupons/BusMarketCouponsUsedModal.vue


+ 286 - 0
src/views/markets/modules/couponsCash/BusMarketCouponsCashForm.vue

@@ -0,0 +1,286 @@
+<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="startTime"
+            >
+              <j-date
+                placeholder="请选择开始时间"
+                v-model="model.startTime"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="结束时间"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="endTime"
+            >
+              <j-date
+                placeholder="请选择结束时间"
+                v-model="model.endTime"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="优惠条件"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="conditions"
+            >
+              <a-radio-group v-model="model.type">
+                <a-radio :value="1">不限制</a-radio>
+                <a-radio :value="2">满</a-radio>
+              </a-radio-group>
+              <a-input-number
+                v-model="model.conditions"
+                :min="1"
+                style="width: 30%"
+                @blur="handleChange"
+              />元可使用
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="每单可使用张数"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="ksyzs"
+            >
+              <a-input-number
+                v-model="model.ksyzs"
+                :min="1"
+                placeholder="请输入每单可使用张数"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="cost"
+            >
+              <a-input-number
+                v-model="model.cost"
+                :min="1"
+                placeholder="请输入金额"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="每人可领取张数"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              :min="1"
+              prop="klqzs"
+            >
+              <a-input-number
+                v-model="model.klqzs"
+                placeholder="请输入可领取张数"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="说明"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="introduce"
+            >
+              <a-input
+                v-model="model.introduce"
+                placeholder="请输入说明"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="使用说明"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="ruleDec"
+            >
+              <a-input
+                v-model="model.ruleDec"
+                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: "BusMarketCouponsCashForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    var validateConditions = (rule, value, callback) => {
+      console.log(22);
+      if (!this.model.conditions && this.model.type === 2) {
+        callback("请输入满多少元!");
+      } else {
+        callback();
+      }
+    };
+    return {
+      roomLayouts: [],
+      model: { type: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        name: [{ required: true, message: "请输入名称!" }],
+        startTime: [{ required: true, message: "请输入开始时间!" }],
+        endTime: [{ required: true, message: "请输入结束时间!" }],
+        type: [{ required: true, message: "请输入优惠条件!" }],
+        conditions: [
+          { required: true, validator: validateConditions, trigger: "change" },
+        ],
+        ksyzs: [{ required: true, message: "请输入每单可使用张数!" }],
+        cost: [{ required: true, message: "请输入金额!" }],
+        introduce: [{ required: true, message: "请输入说明!" }],
+        klqzs: [{ required: true, message: "请输入每人可领取张数!" }],
+      },
+      url: {
+        add: "/business/busMarketCouponsCash/add",
+        edit: "/business/busMarketCouponsCash/edit",
+        queryById: "/business/busMarketCouponsCash/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: {
+    handleChange(e) {
+      // this.$nextTick(() => {
+      //   this.form.validateFields(["conditions"], { force: true });
+      // });
+      if (this.model.conditions) {
+        this.$refs.form.clearValidate(["conditions"]);
+      }
+    },
+    add() {
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      console.log("record", record);
+      var roomLayouts = (record.roomIds || "").split(",");
+      this.model = Object.assign({}, record, { roomLayouts: roomLayouts });
+      this.visible = true;
+      getAction("/rooms/cesRoomLayout/list", { pageNo: 1, pageSize: 100 })
+        .then((res) => {
+          if (res.success) {
+            this.roomLayouts = res.result.records;
+            var data = [];
+            res.result.records.forEach((item) => {
+              data.push({ label: item.name, value: item.id });
+            });
+            this.roomLayouts = data;
+          }
+        })
+        .finally(() => {});
+    },
+    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>

+ 60 - 0
src/views/markets/modules/couponsCash/BusMarketCouponsCashModal.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-coupons-cash-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-coupons-cash-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketCouponsCashForm from './BusMarketCouponsCashForm'
+  export default {
+    name: 'BusMarketCouponsCashModal',
+    components: {
+      BusMarketCouponsCashForm
+    },
+    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>

+ 145 - 0
src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedGenerateForm.vue

@@ -0,0 +1,145 @@
+<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" v-show="false">
+            <a-form-model-item
+              label="免房券id"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="couponsId"
+            >
+            <a-input-number
+                v-model="model.couponsId"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="已生成数量"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <p>{{ total }}</p>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="生成数量"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="num"
+            >
+              <a-input-number
+                v-model="model.num"
+                placeholder="请输入张数"
+                style="width: 100%"
+              />
+            </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: "BusMarketCouponsCashUsedForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      total: 0,
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        //  couponsId: [
+        //     { required: true, message: '请输入免房券id!'},
+        //  ],
+        num: [{ required: true, message: "请输入生成数量!" }],
+      },
+      url: {
+        add: "/business/busMarketCouponsCashUsed/generate",
+        edit: "/business/busMarketCouponsCashUsed/edit",
+        queryById: "/business/busMarketCouponsCashUsed/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add(total, couponsId) {
+      this.total = total;
+      this.modelDefault.couponsId = couponsId;
+      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>

+ 60 - 0
src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedGenerateFormModal.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-coupons-cash-used-generate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-coupons-cash-used-generate-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketCouponsCashUsedGenerateForm from './BusMarketCouponsCashUsedGenerateForm'
+  export default {
+    name: 'BusMarketCouponsCashUsedGenerateFormModal',
+    components: {
+      BusMarketCouponsCashUsedGenerateForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (total,couponsId) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(total,couponsId);
+        })
+      },
+      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>

+ 61 - 25
src/views/markets/modules/Provide/UserList.vue

@@ -6,8 +6,13 @@
         <a-row :gutter="24">
           <a-col :span="6">
             <a-form-item label="">
+              <j-input placeholder="券号" v-model="queryParam.code"></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
               <j-input
-                placeholder="会员名称"
+                placeholder="姓名"
                 v-model="queryParam.user_name"
               ></j-input>
             </a-form-item>
@@ -15,11 +20,26 @@
           <a-col :span="6">
             <a-form-item label="">
               <j-input
-                placeholder="会员手机号"
+                placeholder="手机号"
                 v-model="queryParam.mobile"
               ></j-input>
             </a-form-item>
           </a-col>
+          <a-col :span="4">
+            <a-form-item label="">
+              <a-select
+                v-model="queryParam.status"
+                style="width: 120px"
+                placeholder="请选择状态"
+                :allowClear="true"
+              >
+                <a-select-option value="0">未领取</a-select-option>
+                <a-select-option value="1">已领取</a-select-option>
+                <a-select-option value="2">已使用</a-select-option>
+                <a-select-option value="3">已作废</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
           <a-col :md="6" :sm="8">
             <span
               style="float: left; overflow: hidden"
@@ -28,15 +48,26 @@
               <a-button type="primary" @click="searchQuery" icon="search"
                 >查询</a-button
               >
-
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              >
               <a-button
                 @click="handleAdd"
+                type="danger"
+                style="margin-left: 8px"
+                >生成优惠券</a-button
+              >
+              <a-button
                 type="primary"
-                icon="plus"
+                icon="delete"
                 style="margin-left: 8px"
-                >发放</a-button
+                @click="batchDel"
+                >批量删除</a-button
               >
-
             </span>
           </a-col>
         </a-row>
@@ -96,15 +127,17 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
-          <a v-if="record.statusName!=='已作废'" @click="handleEdit(record)">作废</a>
+          <a v-if="record.statusName !== '已作废'" @click="handleEdit(record)"
+            >作废</a
+          >
         </span>
       </a-table>
     </div>
 
-    <!-- <bus-market-coupons-used-generate-form-modal
+    <bus-market-coupons-cash-used-generate-form-modal
       ref="modalForm"
       @ok="modalFormOk"
-    ></bus-market-coupons-used-generate-form-modal> -->
+    ></bus-market-coupons-cash-used-generate-form-modal>
   </a-card>
 </template>
 
@@ -112,14 +145,14 @@
 import "@/assets/less/TableExpand.less";
 import { mixinDevice } from "@/utils/mixin";
 import { JeecgListMixin } from "@/mixins/JeecgListMixin";
-// import BusMarketCouponsUsedGenerateFormModal from "./BusMarketCouponsUsedGenerateFormModal";
+import BusMarketCouponsCashUsedGenerateFormModal from "./BusMarketCouponsCashUsedGenerateFormModal";
 import { httpAction, getAction } from "@/api/manage";
 
 export default {
   name: "BusMarketCouponsUsedList",
   mixins: [JeecgListMixin, mixinDevice],
   components: {
-    // BusMarketCouponsUsedGenerateFormModal,
+    BusMarketCouponsCashUsedGenerateFormModal,
   },
   props: {
     couponsId: {
@@ -172,17 +205,17 @@ export default {
           title: "领取时间",
           align: "center",
           dataIndex: "gainTime",
-          customRender: function (text) {
-            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
-          },
+          // customRender: function (text) {
+          //   return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          // },
         },
         {
           title: "使用时间",
           align: "center",
           dataIndex: "usedTime",
-          customRender: function (text) {
-            return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
-          },
+          // customRender: function (text) {
+          //   return !text ? "" : text.length > 10 ? text.substr(0, 10) : text;
+          // },
         },
         {
           title: "状态",
@@ -194,16 +227,17 @@ export default {
           dataIndex: "action",
           align: "center",
           fixed: "right",
-          width: 147,
+          width: 80,
           scopedSlots: { customRender: "action" },
         },
       ],
       url: {
-        list: "/business/busMarketCouponsUsed/list?couponsId=" + this.couponsId,
-        delete: "/business/busMarketCouponsUsed/delete",
-        deleteBatch: "/business/busMarketCouponsUsed/deleteBatch",
-        exportXlsUrl: "/business/busMarketCouponsUsed/exportXls",
-        importExcelUrl: "business/busMarketCouponsUsed/importExcel",
+        list:
+          "/business/busMarketCouponsCashUsed/list?couponsId=" + this.couponsId,
+        delete: "/business/busMarketCouponsCashUsed/delete",
+        deleteBatch: "/business/busMarketCouponsCashUsed/deleteBatch",
+        exportXlsUrl: "/business/busMarketCouponsCashUsed/exportXls",
+        importExcelUrl: "business/busMarketCouponsCashUsed/importExcel",
       },
       dictOptions: {},
       superFieldList: [],
@@ -225,7 +259,7 @@ export default {
         content: "是否作废?",
         onOk: function () {
           httpAction(
-            "/business/busMarketCouponsUsed/voided",
+            "/business/busMarketCouponsCashUsed/voided",
             { id: item.id },
             "put"
           )
@@ -310,7 +344,9 @@ export default {
       this.superFieldList = fieldList;
     },
     handleAdd() {
-
+      this.$refs.modalForm.add(this.ipagination.total, this.couponsId);
+      this.$refs.modalForm.title = "优惠券生成";
+      this.$refs.modalForm.disableSubmit = false;
     },
   },
 };

+ 64 - 0
src/views/markets/modules/couponsCash/BusMarketCouponsCashUsedListModal.vue

@@ -0,0 +1,64 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-market-coupons-cash-used-list :couponsId="couponsId" ref="modalCouponsCashUsedListModal"></bus-market-coupons-cash-used-list>
+  </j-modal>
+</template>
+
+<script>
+  import BusMarketCouponsCashUsedList from "./BusMarketCouponsCashUsedList";
+  export default {
+    name: 'BusMarketCouponsCashUsedListModal',
+    components: {
+      BusMarketCouponsCashUsedList
+    },
+    props: {
+      couponsId: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        visible: false,
+        disableSubmit: false,
+        // eventId:'',
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.modalCouponsCashUsedListModal.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.modalCouponsCashUsedListModal.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 352 - 0
src/views/markets/modules/couponsProvide/BusMemberCardList.vue

@@ -0,0 +1,352 @@
+<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"
+              ></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <j-input
+                placeholder="会员手机号"
+                v-model="queryParam.mobile"
+              ></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-input-number
+                style="margin-left: 8px"
+                v-model="num"
+                :min="1"
+                :max="10"
+              />
+              <a-button
+                @click="handleAdd"
+                type="danger"
+                :disabled="selectedRowKeys.length <= 0"
+                >发放</a-button
+              > -->
+              <a-input-search
+                style="width: 200px; margin-left: 8px"
+                placeholder="请输入每人发放张数"
+                enter-button="发放"
+                v-model="num"
+                type="danger"
+                :disabled="selectedRowKeys.length <= 0"
+                @search="handleAdd"
+              />
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- table区域-begin -->
+    <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="avatar" slot-scope="text">
+          <a-avatar v-if="text" :src="text" />
+          <a-avatar v-else icon="user" />
+        </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>
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import { httpAction } from "@/api/manage";
+export default {
+  name: "BusMemberCardList",
+  mixins: [JeecgListMixin, mixinDevice],
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+    couponsType: {
+      type: Number,
+      default: 1,
+    },
+  },
+  data() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    return {
+      hotelId: "",
+      num: 1,
+      description: "bus_member_card管理页面",
+      // 表头
+      columns: [
+        {
+          title: "商家",
+          align: "center",
+          dataIndex: "hotelName",
+        },
+        {
+          title: "头像",
+          align: "center",
+          dataIndex: "avatar",
+          scopedSlots: { customRender: "avatar" },
+        },
+        {
+          title: "会员姓名",
+          align: "center",
+          dataIndex: "name",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "性别",
+          align: "center",
+          dataIndex: "sex",
+          customRender: function (text) {
+            return text === 1 ? "男" : "女";
+          },
+        },
+        {
+          title: "会员卡号",
+          align: "center",
+          dataIndex: "cardNo",
+        },
+        {
+          title: "等级类型",
+          align: "center",
+          dataIndex: "gradeName",
+        },
+        {
+          title: "证件号",
+          align: "center",
+          dataIndex: "certificateNo",
+        },
+        {
+          title: "推荐员工",
+          align: "center",
+          dataIndex: "staffId",
+        },
+        {
+          title: "可用积分",
+          align: "center",
+          dataIndex: "integral",
+        },
+        {
+          title: "可用余额",
+          align: "center",
+          dataIndex: "balance",
+        },
+        // {
+        //   title: '操作',
+        //   dataIndex: 'action',
+        //   align:"center",
+        //   fixed:"right",
+        //   width:147,
+        //   scopedSlots: { customRender: 'action' }
+        // }
+      ],
+      url: {
+        list:
+          hotelInfo && hotelInfo.id
+            ? "/business/busMemberCard/list?hotelId=" + hotelInfo.id
+            : "/business/busMemberCard/list",
+        delete: "/business/busMemberCard/delete",
+        deleteBatch: "/business/busMemberCard/deleteBatch",
+        exportXlsUrl: "/business/busMemberCard/exportXls",
+        importExcelUrl: "business/busMemberCard/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleAdd() {
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning("请选择一条记录!");
+        return;
+      }
+      if (this.num <= 0) {
+        this.$message.warning("发放数量不能小于0!");
+        return;
+      }
+      var that = this;
+      that.confirmLoading = true;
+      var url = "/business/busMarketCouponsUsed/gainCouponsUsedToMember";
+      if (this.couponsType === 2) {
+        url = "/business/busMarketCouponsCashUsed/gainCouponsCashUsedToMember";
+      }
+      httpAction(
+        url,
+        {
+          couponsId: this.couponsId,
+          num: this.num,
+          memberIds: this.selectedRowKeys,
+        },
+        "post"
+      )
+        .then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.$emit("ok");
+          } else {
+            that.$message.warning(res.message);
+          }
+        })
+        .finally(() => {
+          that.confirmLoading = false;
+        });
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({ type: "string", value: "tenantId", text: "关联租户" });
+      fieldList.push({ type: "string", value: "hotelId", text: "关联酒店" });
+      fieldList.push({ type: "string", value: "mobile", text: "手机号" });
+      fieldList.push({ type: "string", value: "cardNo", text: "会员卡号" });
+      fieldList.push({ type: "string", value: "cardInnerNo", text: "卡内码" });
+      fieldList.push({ type: "string", value: "gradeId", text: "等级类型" });
+      fieldList.push({ type: "number", value: "memberFee", text: "会员费" });
+      fieldList.push({ type: "int", value: "payType", text: "付款类型" });
+      fieldList.push({ type: "int", value: "paymentMethod", text: "付款方式" });
+      fieldList.push({ type: "string", value: "name", text: "会员姓名" });
+      fieldList.push({ type: "string", value: "avatar", text: "头像" });
+      fieldList.push({ type: "int", value: "sex", text: "性别" });
+      fieldList.push({
+        type: "int",
+        value: "certificateType",
+        text: "证件类型",
+      });
+      fieldList.push({
+        type: "string",
+        value: "certificateNo",
+        text: "证件号",
+      });
+      fieldList.push({ type: "string", value: "address", text: "地址" });
+      fieldList.push({
+        type: "string",
+        value: "consumePassword",
+        text: "消费密码",
+      });
+      fieldList.push({ type: "int", value: "validity", text: "有效期" });
+      fieldList.push({
+        type: "date",
+        value: "validityEndTime",
+        text: "有效期截止日期",
+      });
+      fieldList.push({ type: "string", value: "remark", text: "备注" });
+      fieldList.push({ type: "string", value: "staffId", text: "推荐员工" });
+      fieldList.push({ type: "int", value: "integral", text: "可用积分" });
+      fieldList.push({ type: "number", value: "balance", text: "可用余额" });
+      this.superFieldList = fieldList;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+/deep/ .ant-input-search-button {
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled]:hover {
+  opacity: 0.7;
+  background-color: #ff4d4f;
+  border-color: #ff4d4f;
+}
+/deep/ .ant-input-search-button[disabled] {
+  opacity: 0.7;
+  color: #ffffff;
+}
+</style>

+ 10 - 5
src/views/markets/modules/Provide/MobileForm.vue

@@ -81,6 +81,11 @@ export default {
       default: "",
       required: true,
     },
+    couponsType: {
+      type: Number,
+      default: 1,
+      required: true,
+    },
   },
   data() {
     return {
@@ -120,11 +125,11 @@ export default {
       this.$refs.form.validate((valid) => {
         if (valid) {
           that.confirmLoading = true;
-          httpAction(
-            "/business/busMarketCouponsUsed/gainCouponsUsedToNoMember",
-            this.model,
-            "post"
-          )
+          var url = "/business/busMarketCouponsUsed/gainCouponsUsedToNoMember";
+          if (this.couponsType === 2) {
+            url = "/business/busMarketCouponsCashUsed/gainCouponsCashUsedToNoMember";
+          }
+          httpAction(url, this.model, "post")
             .then((res) => {
               if (res.success) {
                 that.$message.success(res.message);

+ 23 - 16
src/views/markets/modules/Provide/index.vue

@@ -10,15 +10,24 @@
     cancelText="关闭"
   >
     <a-card :bordered="false">
-      <a-tabs default-active-key="1">
+      <a-tabs default-active-key="1" @tabClick="tabClick">
         <a-tab-pane key="1">
           <span slot="tab"> 会员 </span>
-          <!-- <user-list :couponsId="couponsId" ref="userList"></user-list> -->
-          会员功能开发中,请体验非会员...
+          <bus-member-card-list
+            :couponsId="couponsId"
+            :couponsType="couponsType"
+            ref="busMemberCardList"
+            @ok="submitCallback"
+          ></bus-member-card-list>
         </a-tab-pane>
         <a-tab-pane key="2">
           <span slot="tab"> 非会员 </span>
-          <mobile-form :couponsId="couponsId" ref="mobileForm" @ok="submitCallback" ></mobile-form>
+          <mobile-form
+            :couponsId="couponsId"
+            :couponsType="couponsType"
+            ref="mobileForm"
+            @ok="submitCallback"
+          ></mobile-form>
         </a-tab-pane>
       </a-tabs>
     </a-card>
@@ -26,11 +35,11 @@
 </template>
 
 <script>
-import UserList from "./UserList";
+import BusMemberCardList from "./BusMemberCardList";
 import MobileForm from "./MobileForm";
 export default {
   components: {
-    UserList,
+    BusMemberCardList,
     MobileForm,
   },
   props: {
@@ -38,20 +47,18 @@ export default {
       type: String,
       default: "",
     },
+    couponsType: {
+      type: Number,
+      default: 1,
+    },
   },
   data() {
     return { title: "", width: 1200, visible: false, disableSubmit: false };
   },
   methods: {
-    // add() {
-    //   this.visible = true;
-    // },
-    // edit(record) {
-    //   this.visible = true;
-    //   this.$nextTick(() => {
-    //     this.$refs.mobileForm.edit(record);
-    //   });
-    // },
+    tabClick(e) {
+      this.disableSubmit = e !== '2';
+    },
     close() {
       this.$emit("close");
       this.visible = false;
@@ -60,7 +67,7 @@ export default {
       this.$refs.mobileForm.submitForm();
     },
     submitCallback() {
-      console.log('submitCallback')
+      console.log("submitCallback");
       this.$emit("ok");
       this.visible = false;
     },

+ 316 - 0
src/views/markets/modules/memberBalance/BusMemberBalanceLogForm.vue

@@ -0,0 +1,316 @@
+<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="memberId"
+            >
+              <a-select
+                v-model="model.memberId"
+                style="width: 100%"
+                placeholder="请选择会员"
+                show-search
+                option-filter-prop="children"
+                :filter-option="filterOption"
+              >
+                <a-select-option
+                  v-for="(item, index) in memberList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="type"
+            >
+              <a-radio-group v-model="model.type">
+                <a-radio :value="1">充值</a-radio>
+                <a-radio :value="2">扣费</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-if="model.type == 1">
+            <a-form-model-item
+              label="充值配置"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-select
+                v-model="model.marketRechargeId"
+                style="width: 100%"
+                placeholder="充值配置"
+                @change="marketRechargeChage"
+              >
+                <a-select-option
+                  v-for="(item, index) in marketRechargeList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              :label="model.type == 1 ? '充值金额' : '扣费金额'"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="money"
+            >
+              <a-input-number
+                v-model="model.money"
+                placeholder="请输入充值金额"
+                :min="1"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-if="model.type == 1">
+            <a-form-model-item
+              label="赠送金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              :min="0"
+              prop="giveMoney"
+            >
+              <a-input-number
+                v-model="model.giveMoney"
+                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-textarea
+                v-model="model.remarks"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-if="model.type == 1">
+            <a-form-model-item
+              label="推荐员工"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="staffId"
+            >
+              <a-select
+                v-model="model.staffId"
+                style="width: 100%"
+                placeholder="推荐员工"
+              >
+                <a-select-option
+                  v-for="(item, index) in staffList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="支付方式"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="paymentMethod"
+            >
+              <a-select
+                v-model="model.paymentMethod"
+                style="width: 100%"
+                placeholder="支付方式"
+              >
+                <a-select-option
+                  v-for="(item, index) in paymentMethodList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="支付金额"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="payMoney"
+            >
+              <a-input-number
+                v-model="model.payMoney"
+                placeholder="请输入支付金额"
+                style="width: 100%"
+                :min="0"
+              />
+            </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: "BusMemberBalanceLogForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { type: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        memberId: [{ required: true, message: "请选择会员!" }],
+        type: [{ required: true, message: "请输入类型!" }],
+        money: [{ required: true, message: "请输入充值金额!" }],
+        balance: [{ required: true, message: "请输入金额余额!" }],
+        giveMoney: [{ required: true, message: "请输入赠送金额!" }],
+        paymentMethod: [{ required: true, message: "请输入支付方式!" }],
+        payMoney: [{ required: true, message: "请输入支付金额!" }],
+        code: [{ required: true, message: "请输入流水号!" }],
+      },
+      url: {
+        add: "/business/busMemberBalanceLog/add",
+        edit: "/business/busMemberBalanceLog/edit",
+        queryById: "/business/busMemberBalanceLog/queryById",
+      },
+      memberList: [],
+      marketRechargeList: [],
+      staffList: [],
+      paymentMethodList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    httpAction(
+      "/business/busMemberCard/list",
+      { pageNo: 1, pageSize: 1000 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.memberList = res.result.records;
+      }
+    });
+    httpAction(
+      "/business/busMarketRecharge/list",
+      { pageNo: 1, pageSize: 1000 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.marketRechargeList = res.result.records;
+      }
+    });
+    httpAction(
+      "/business/busRoomPayType/queryList",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.paymentMethodList = res.result;
+      }
+    });
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    marketRechargeChage(e) {
+      var item = this.marketRechargeList.find((t) => t.id === e);
+      this.model.money = item.money;
+      this.model.giveMoney = item.returnRoney;
+    },
+    filterOption(input, option) {
+      return (
+        option.componentOptions.children[0].text
+          .toLowerCase()
+          .indexOf(input.toLowerCase()) >= 0
+      );
+    },
+    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/markets/modules/memberBalance/BusMemberBalanceLogModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-member-balance-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-member-balance-log-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 BusMemberBalanceLogForm from './BusMemberBalanceLogForm'
+
+  export default {
+    name: 'BusMemberBalanceLogModal',
+    components: {
+      BusMemberBalanceLogForm
+    },
+    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/markets/modules/memberBalance/BusMemberBalanceLogModal.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-member-balance-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-balance-log-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberBalanceLogForm from './BusMemberBalanceLogForm'
+  export default {
+    name: 'BusMemberBalanceLogModal',
+    components: {
+      BusMemberBalanceLogForm
+    },
+    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>

+ 286 - 0
src/views/markets/modules/memberCard/BusMemberCardForm.vue

@@ -0,0 +1,286 @@
+<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="mobile">
+              <a-input v-model="model.mobile" placeholder="请输入手机号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="会员卡号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardNo">
+              <a-input v-model="model.cardNo" placeholder="请输入会员卡号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="卡内码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cardInnerNo">
+              <a-input v-model="model.cardInnerNo" placeholder="请输入卡内码"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="等级类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gradeId">
+              <a-select
+                v-model:value="model.gradeId"
+                style="width: 100%"
+                placeholder="会员等级"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in gradeList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="会员费" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="memberFee">
+              <a-input-number v-model="model.memberFee" placeholder="请输入会员费" style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="付款类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payType">
+              <a-radio-group v-model="model.payType">
+                <a-radio :value="1">现付</a-radio>
+                <a-radio :value="2" disabled>转房帐</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-if="model.payType==1">
+            <a-form-model-item label="付款方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="paymentMethod">
+              <a-select
+                v-model="model.paymentMethod"
+                style="width: 100%"
+                placeholder="付款方式"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in paymentMethodList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </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="avatar">
+              <a-input v-model="model.avatar" placeholder="请输入头像"  ></a-input>
+            </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sex">
+              <a-radio-group v-model="model.sex">
+                <a-radio :value="1">男</a-radio>
+                <a-radio :value="2">女</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="证件类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="certificateType">
+              <a-select
+                v-model="model.certificateType"
+                style="width: 100%"
+                placeholder="证件类型"
+                :allowClear="true"
+              >
+                <a-select-option :value="1" >身份证</a-select-option>
+              </a-select>
+            </a-form-model-item>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="证件号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="certificateNo">
+              <a-input v-model="model.certificateNo" placeholder="请输入证件号"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address">
+              <a-input v-model="model.address" placeholder="请输入地址"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="消费密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="consumePassword">
+              <a-input-password  v-model="model.consumePassword" placeholder="请输入消费密码"></a-input-password>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="有效期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validity">
+              <a-radio-group v-model="model.validity">
+                <a-radio :value="1">无限制</a-radio>
+                <a-radio :value="2">有限制</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-if="model.validity==2">
+            <a-form-model-item label="有效期截止日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="validityEndTime" :rules="[
+                                        {
+                                            required: true,
+                                            message: '请输入有效期截止日期',
+                                            trigger: 'change',
+                                        },
+                                    ]">
+              <j-date placeholder="请选择有效期截止日期" v-model="model.validityEndTime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-textarea v-model="model.remark" rows="4" placeholder="请输入备注" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="推荐员工" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="staffId">
+              <a-select
+                v-model="model.staffId"
+                style="width: 100%"
+                placeholder="推荐员工"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in staffList"
+                  :key="index"
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
+                >
+              </a-select>
+            </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: "BusMemberCardForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { payType: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        mobile: [
+          {
+            required: true,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+            message: "请输入手机号!",
+          },
+        ],
+        cardNo: [{ required: true, message: "请输入会员卡号!" }],
+        gradeId: [{ required: true, message: "请输入等级类型!" }],
+        payType: [{ required: true, message: "请输入付款类型!" }],
+        paymentMethod: [{ required: true, message: "请输入付款方式!" }],
+        name: [{ required: true, message: "请输入会员姓名!" }],
+        sex: [{ required: true, message: "请输入性别!" }],
+        certificateType: [{ required: true, message: "请输入证件类型!" }],
+        validity: [{ required: true, message: "请输入有效期!" }],
+      },
+      url: {
+        add: "/business/busMemberCard/add",
+        edit: "/business/busMemberCard/edit",
+        queryById: "/business/busMemberCard/queryById",
+      },
+      gradeList: [],
+      paymentMethodList: [],
+      staffList: [],
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    httpAction(
+      "/org.jeecg.modules.business/busMarketMember/list",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.gradeList = res.result.records;
+      }
+    });
+    httpAction(
+      "/business/busRoomPayType/queryList",
+      { pageNo: 1, pageSize: 100 },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.paymentMethodList = res.result;
+      }
+    });
+    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/markets/modules/memberCard/BusMemberCardModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-member-card-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 BusMemberCardForm from './BusMemberCardForm'
+
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    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/markets/modules/memberCard/BusMemberCardModal.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-member-card-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-card-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberCardForm from './BusMemberCardForm'
+  export default {
+    name: 'BusMemberCardModal',
+    components: {
+      BusMemberCardForm
+    },
+    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>

+ 170 - 0
src/views/markets/modules/memberPoint/BusMemberPointLogForm.vue

@@ -0,0 +1,170 @@
+<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"
+            >
+              <span>{{ model.name }}</span>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="卡号"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <span>{{ model.cardNo }}</span>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="积分"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <span>{{ model.integral || 0 }}</span>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="类型"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-radio-group v-model="model.type">
+                <a-radio :value="1">充值</a-radio>
+                <a-radio :value="2">扣除</a-radio>
+                <a-radio :value="3">清空</a-radio>
+              </a-radio-group>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24" v-if="model.type != 3">
+            <a-form-model-item
+              label="充值积分"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="num"
+            >
+              <a-input-number v-model="model.num" style="width: 100%" :min="1" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="备注"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remarks"
+            >
+              <a-textarea
+                v-model="model.remarks"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </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: "BusMemberPointLogForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { type: 1, num: 1 },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        type: [{ required: true, message: "请输入类型!" }],
+        num: [{ required: true, message: "请输入积分数量!" }],
+      },
+      url: {
+        add: "/business/busMemberPointLog/add",
+        edit: "/business/busMemberPointLog/edit",
+        queryById: "/business/busMemberPointLog/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add(record) {
+      this.modelDefault = Object.assign({}, record,this.modelDefault);
+      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/markets/modules/memberPoint/BusMemberPointLogModal.Style#Drawer.vue

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <bus-member-point-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></bus-member-point-log-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 BusMemberPointLogForm from './BusMemberPointLogForm'
+
+  export default {
+    name: 'BusMemberPointLogModal',
+    components: {
+      BusMemberPointLogForm
+    },
+    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/markets/modules/memberPoint/BusMemberPointLogModal.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-member-point-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-member-point-log-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMemberPointLogForm from './BusMemberPointLogForm'
+  export default {
+    name: 'BusMemberPointLogModal',
+    components: {
+      BusMemberPointLogForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      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>

+ 208 - 0
src/views/settings/components/modules/printTemplateForm.vue

@@ -0,0 +1,208 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <div class="container">
+      <div class="left">
+        <j-form-container :disabled="formDisabled">
+          <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" layout="vertical">
+            <a-row >
+              <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="specs">
+                  <j-dict-select-tag type="radio" v-model="model.specs" placeholder="请选择规格" dictCode="print_template_specs"
+                                     @change="e=>onSpecsChange(e)"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remarks">
+                  <a-textarea :rows="4" v-model="model.remarks" placeholder="请输入备注"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="preview">
+                  <a-checkbox v-model="model.preview">不显示打印预览窗口,直接打印小票</a-checkbox>
+                </a-form-model-item>
+              </a-col>
+
+              <a-col :span="24">
+                <a-form-model-item label="默认打印机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="defaultPrint">
+                  <a-input v-model="model.defaultPrint" placeholder="请输入默认打印机"  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="打印类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printType">
+                  <j-dict-select-tag type="radio" v-model="model.printType" placeholder="请选择打印类型" dictCode="print_template_type"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="是否显示退菜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isShowRefund">
+                  <j-dict-select-tag type="radio" v-model="model.isShowRefund" placeholder="请选择是否显示退菜" dictCode="print_template_refund"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="打印份数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printSum">
+                  <a-input-number v-model="model.printSum" placeholder="请输入打印份数" style="width: 100%" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="打印时内容宽度偏差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printContentOffset">
+                  <a-input v-model="model.printContentOffset" placeholder="请输入打印时内容宽度偏差"  ></a-input>
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="24">
+                <a-form-model-item label="打印时纸张宽度偏差" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="printPaperOffset">
+                  <a-input v-model="model.printPaperOffset" placeholder="请输入打印时纸张宽度偏差"  ></a-input>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+          </a-form-model>
+        </j-form-container>
+      </div>
+      <div class="right">
+        <a-card class="template" :style="{width:width}">
+          <p>Card content</p>
+          <p>Card content</p>
+          <p>Card content</p>
+        </a-card>
+      </div>
+    </div>
+
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'printTemplateForm',
+    components: {
+    },
+    props: {
+      //表单禁用
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+        },
+        wrapperCol: {
+        },
+        confirmLoading: false,
+        validatorRules: {
+           name: [
+              { required: true, message: '请输入打印模板名称!'},
+           ],
+           specs: [
+              { required: true, message: '请输入规格!'},
+           ],
+          remarks: [
+            { required: true, message: '请输入备注!'},
+          ],
+          printSum: [
+            { required: true, message: '请输入打印份数!'},
+          ],
+          printContentOffset: [
+            { required: true, message: '请输入打印时内容宽度偏差!'},
+          ],
+          printPaperOffset: [
+            { required: true, message: '请输入打印时纸张宽度偏差!'},
+          ],
+        },
+        url: {
+          add: "/business/busPrintTemplate/add",
+          edit: "/business/busPrintTemplate/edit",
+          queryById: "/business/busPrintTemplate/queryById"
+        },
+        width:"94%"
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.width = record.specs;
+        if (record.specs === 'A5'){
+          // this.width = '210mm';
+        }
+        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';
+              var info = JSON.parse(localStorage.getItem("storeInfo"));
+              this.model.hotelId = info.id;
+            }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;
+            })
+          }
+
+        })
+      },
+      onSpecsChange(val){
+        console.log('规格切换  ————  '+val)
+        this.width = val;
+        console.log(this.width)
+        if (val === 'A5'){
+          // this.width = '210mm';
+        }
+      }
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+  .container{
+    display: flex;
+    flex-direction: row;
+  }
+  .left{
+    flex: 2;
+  }
+  .right{
+    flex: 3;
+  }
+  .template{
+    margin-left: 10px;
+  }
+</style>

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

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <print-template-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></print-template-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 printTemplateForm from './printTemplateForm'
+
+  export default {
+    name: 'printTemplateModal',
+    components: {
+      printTemplateForm,
+    },
+    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/printTemplateModal.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="关闭">
+    <print-template-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></print-template-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import printTemplateForm from './printTemplateForm'
+  export default {
+    name: 'printTemplateModal',
+    components: {
+      printTemplateForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        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>

+ 203 - 4
src/views/settings/components/printTemplate.vue

@@ -1,13 +1,212 @@
 <template>
-    <div>打印模板</div>
+    <a-card :bordered="false">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                    <a-col :md="4" :sm="6">
+                        <a-form-item>
+                            <j-input placeholder="参数名" v-model="queryParam.name"></j-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="4" :sm="6">
+                        <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                          <a-button type="primary" @click="searchQuery" icon="search">查询</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-button type="primary" icon="download" @click="handleExportXls('打印模板')">导出</a-button>-->
+<!--            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--                <a-button type="primary" icon="import">导入</a-button>-->
+<!--            </a-upload>-->
+<!--            &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
+<!--            <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
+<!--            <a-dropdown v-if="selectedRowKeys.length > 0">-->
+<!--                <a-menu slot="overlay">-->
+<!--                    <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
+<!--                </a-menu>-->
+<!--                <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="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>
+
+        <print-template-modal ref="modalForm" @ok="modalFormOk"></print-template-modal>
+    </a-card>
 </template>
 
 <script>
+
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import printTemplateModal from "./modules/printTemplateModal";
+
     export default {
-        name: "printTemplate"
+        name: 'printTemplate',
+        mixins:[JeecgListMixin, mixinDevice],
+        components: {
+            printTemplateModal,
+        },
+        data () {
+            return {
+                description: '打印模板管理页面',
+                // 表头
+                columns: [
+                    {
+                        title: '',
+                        dataIndex: '',
+                        key:'rowIndex',
+                        width:60,
+                        align:"center",
+                        customRender:function (t,r,index) {
+                            return parseInt(index)+1;
+                        }
+                    },
+                    {
+                        title:'打印单据名',
+                        align:"center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title:'规格',
+                        align:"center",
+                        dataIndex: 'specs'
+                    },
+                    {
+                        title:'打印份数',
+                        align:"center",
+                        dataIndex: 'printSum'
+                    },
+                    {
+                        title:'打印时内容宽度偏差',
+                        align:"center",
+                        dataIndex: 'printContentOffset'
+                    },
+                    {
+                        title:'打印时纸张宽度偏差',
+                        align:"center",
+                        dataIndex: 'printPaperOffset'
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align:"center",
+                        fixed:"right",
+                        width:147,
+                        scopedSlots: { customRender: 'action' }
+                    }
+                ],
+                url: {
+                    list: "/business/busPrintTemplate/list",
+                    delete: "/business/busPrintTemplate/delete",
+                    deleteBatch: "/business/busPrintTemplate/deleteBatch",
+                    exportXlsUrl: "/business/busPrintTemplate/exportXls",
+                    importExcelUrl: "business/busPrintTemplate/importExcel",
+
+                },
+                dictOptions:{},
+                superFieldList:[],
+            }
+        },
+        created() {
+            this.getSuperFieldList();
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods: {
+            initDictConfig(){
+            },
+            getSuperFieldList(){
+                let fieldList=[];
+                fieldList.push({type:'string',value:'tenantId',text:'关联租户'})
+                fieldList.push({type:'string',value:'hotelId',text:'关联酒店'})
+                fieldList.push({type:'string',value:'name',text:'打印模板名称'})
+                fieldList.push({type:'string',value:'specs',text:'规格'})
+                fieldList.push({type:'string',value:'remarks',text:'备注'})
+                fieldList.push({type:'string',value:'defaultPrint',text:'默认打印机'})
+                fieldList.push({type:'int',value:'printType',text:'打印类型(1-明细;2-汇总)'})
+                fieldList.push({type:'int',value:'printSum',text:'打印份数'})
+                fieldList.push({type:'string',value:'preview',text:'打印预览'})
+                fieldList.push({type:'string',value:'printContentOffset',text:'打印时内容宽度偏差'})
+                fieldList.push({type:'string',value:'printPaperOffset',text:'打印时纸张宽度偏差'})
+                fieldList.push({type:'int',value:'isShowRefund',text:'状态(0-关闭;1-开启)'})
+                this.superFieldList = fieldList
+            }
+        }
     }
 </script>
-
 <style scoped>
-
+    @import '~@assets/less/common.less';
 </style>