Browse Source

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

qh 2 years ago
parent
commit
ce49b4399c

+ 7 - 1
src/views/markets/marketInfo.vue

@@ -33,7 +33,7 @@
         />
         <p>协议单位</p>
       </div>
-      <div class="height-100" @click="toPage()">
+      <div class="height-100" @click="toPage('/tenant/marketinfo/mealcouponsverify')">
         <img
           src="http://oss.qlan99.com/20200529/7a270d9a3a534034ac03c2fdd23139ab.png"
         />
@@ -45,6 +45,12 @@
         />
         <p>优惠券</p>
       </div>
+      <div class="height-100" @click="toPage('/tenant/marketinfo/mealcoupons')">
+        <img
+          src="http://oss.qlan99.com/20200529/7a270d9a3a534034ac03c2fdd23139ab.png"
+        />
+        <p>餐券</p>
+      </div>
       <div class="height-100" @click="toPage('/tenant/marketinfo/coupons')">
         <img
           src="http://oss.qlan99.com/20200529/7a270d9a3a534034ac03c2fdd23139ab.png"

+ 328 - 0
src/views/markets/mealcoupons.vue

@@ -0,0 +1,328 @@
+<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 :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-meal-coupons-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-meal-coupons-modal>
+    <bus-market-meal-coupons-used-list-modal
+      ref="modalMealCouponsUsedListModal"
+      :couponsId="couponsId"
+    ></bus-market-meal-coupons-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 BusMarketMealCouponsModal from "./modules/mealCoupons/BusMarketMealCouponsModal";
+import BusMarketMealCouponsUsedListModal from "./modules/mealCoupons/BusMarketMealCouponsUsedListModal";
+import ProvideIndexModal from "./modules/couponsProvide/index";
+import { deleteAction } from "@/api/manage";
+export default {
+  name: "coupons",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMarketMealCouponsModal,
+    BusMarketMealCouponsUsedListModal,
+    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: "typeName",
+        },
+        {
+          title: "金额",
+          align: "center",
+          dataIndex: "cost",
+        },
+        {
+          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: "introduce",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 147,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMarketMealCoupons/list",
+        delete: "/business/busMarketMealCoupons/delete",
+        deleteBatch: "/business/busMarketMealCoupons/deleteBatch",
+        exportXlsUrl: "/business/busMarketMealCoupons/exportXls",
+        importExcelUrl: "business/busMarketMealCoupons/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.modalMealCouponsUsedListModal.visible = true;
+      this.$refs.modalMealCouponsUsedListModal.title = "详情";
+      this.$refs.modalMealCouponsUsedListModal.disableSubmit = true;
+      this.$refs.modalMealCouponsUsedListModal.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>

+ 254 - 0
src/views/markets/mealcouponsverify.vue

@@ -0,0 +1,254 @@
+<template>
+  <a-card style="width: 100%; height: 100%">
+    <a-tabs type="card" default-active-key="0" @tabClick="tabClick">
+      <a-tab-pane key="">
+        <span slot="tab"> 全部 </span>
+        <!-- <member-list></member-list> -->
+      </a-tab-pane>
+      <a-tab-pane v-for="(item, index) in mealCouponTypeList" :key="item.value">
+        <span slot="tab">
+          {{ item.label }}
+        </span>
+        <!-- <market-recharge-list></market-recharge-list> -->
+      </a-tab-pane>
+    </a-tabs>
+    <div style="position: absolute; right: 50px; bottom: 120px; z-index: 99999">
+      <a-button
+        type="danger"
+        shape="circle"
+        icon="plus"
+        size="large"
+        @click="handleAdd"
+      />
+    </div>
+    <a-row type="flex">
+      <a-col :span="6" :order="1">
+        <div class="height-100">
+          <p class="header_num">{{ stat.dayCount || 0 }}</p>
+          <span class="header_name">今日总数</span>
+        </div>
+      </a-col>
+      <a-col :span="6" :order="2">
+        <div class="height-100">
+          <p class="header_num">{{ stat.dayUsedCount || 0 }}</p>
+          <span class="header_name">今日已核销</span>
+        </div>
+      </a-col>
+      <a-col :span="6" :order="3">
+        <div class="height-100">
+          <p class="header_num">{{ stat.dayReceivedCount || 0 }}</p>
+          <span class="header_name">今日待核销</span>
+        </div>
+      </a-col>
+      <a-col :span="6" :order="4">
+        <div class="height-100">
+          <p class="header_num">{{ stat.dayVoidedCount || 0 }}</p>
+          <span class="header_name">今日作废</span>
+        </div>
+      </a-col>
+    </a-row>
+    <div style="margin-top: 15px">
+      <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>
+    </div>
+    <bus-market-meal-coupons-used-verify-modal
+      ref="modalMarketMealCouponsUsedVerifyModal"
+      @fatherLoadData="fatherLoadData"
+    ></bus-market-meal-coupons-used-verify-modal>
+  </a-card>
+</template>
+
+<script>
+import BusMarketMealCouponsUsedVerifyModal from "./modules/mealCoupons/BusMarketMealCouponsUsedVerifyModal.vue";
+import { httpAction, getAction } from "@/api/manage";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+export default {
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMarketMealCouponsUsedVerifyModal,
+  },
+  data() {
+    return {
+      mealCouponTypeList: [],
+      description: "餐券核销页面",
+      // 表头
+      columns: [
+        {
+          title: "餐券名称",
+          align: "center",
+          dataIndex: "couponsName",
+        },
+        {
+          title: "餐券类型",
+          align: "center",
+          dataIndex: "typeName",
+        },
+        {
+          title: "券号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "房间号",
+          align: "center",
+          dataIndex: "roomNumber",
+        },
+        {
+          title: "核销人",
+          align: "center",
+          dataIndex: "usedUserName",
+        },
+        {
+          title: "核销时间",
+          align: "center",
+          dataIndex: "usedTime",
+        },
+      ],
+      url: {
+        list: "/business/busMarketMealCouponsUsed/verifyList",
+        delete: "/business/busMarketMealCouponsUsed/delete",
+        deleteBatch: "/business/busMarketMealCouponsUsed/deleteBatch",
+        exportXlsUrl: "/business/busMarketMealCouponsUsed/exportXls",
+        importExcelUrl: "business/busMarketMealCouponsUsed/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+      stat: {},
+    };
+  },
+  created() {
+    httpAction(
+      "/rooms/cesMealCoupon/fetch",
+      { hotelId: hotelInfo.id },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.mealCouponTypeList = res.result;
+      }
+    });
+    this.getStat();
+  },
+  methods: {
+    getStat() {
+      console.log("this.queryParam.type",this.queryParam.type)
+      getAction(
+        "/business/busMarketMealCouponsUsed/stat",
+        { hotelId: hotelInfo.id, type: this.queryParam.type }
+      ).then((res) => {
+        if (res.success) {
+          this.stat = res.result;
+        }
+      });
+    },
+    tabClick(e) {
+      console.log(e);
+      this.queryParam.type = e;
+      this.loadData();
+      this.getStat();
+    },
+    handleAdd() {
+      this.$refs.modalMarketMealCouponsUsedVerifyModal.visible = true;
+      this.$refs.modalMarketMealCouponsUsedVerifyModal.title = "详情";
+      this.$refs.modalMarketMealCouponsUsedVerifyModal.disableSubmit = true;
+      this.$refs.modalMarketMealCouponsUsedVerifyModal.add();
+    },
+    fatherLoadData() {
+      console.log(2);
+      this.loadData();
+    },
+  },
+};
+</script>
+
+<style scoped>
+.main {
+  height: 70% !important;
+}
+.height-100 {
+  padding: 2px;
+  border: 1px solid #d8d8d8;
+  text-align: center;
+}
+.header_num {
+  font-size: 24px;
+  color: #5197ee;
+  font-weight: bold;
+}
+.header_name {
+  font-size: 17px;
+}
+</style>

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

@@ -28,7 +28,7 @@
           <a-col :span="4">
             <a-form-item label="">
               <a-select
-                v-model:value="queryParam.status"
+                v-model="queryParam.status"
                 style="width: 120px"
                 placeholder="请选择状态"
                 :allowClear="true"

+ 212 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsForm.vue

@@ -0,0 +1,212 @@
+<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="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="type"
+            >
+            <a-select
+                v-model="model.type"
+                style="width: 100%"
+                placeholder="请选择餐券类型"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in mealCouponTypeList"
+                  :key="index"
+                  :value="item.value"
+                  >{{ item.label }}</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="cost"
+            >
+              <a-input-number
+                v-model="model.cost"
+                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="consumeProjectId"
+            >
+              <a-select
+                v-model="model.consumeProjectId"
+                style="width: 100%"
+                placeholder="请选择消费项目"
+                :allowClear="true"
+              >
+                <a-select-option
+                  v-for="(item, index) in stockTypeList"
+                  :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: "BusMarketMealCouponsForm",
+  components: {},
+  props: {
+    //表单禁用
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      validatorRules: {
+        name: [{ required: true, message: "请输入名称!" }],
+        type: [{ required: true, message: "请输入餐券类型!" }],
+        cost: [{ required: true, message: "请输入金额!" }],
+        introduce: [{ required: true, message: "请输入说明!" }],
+        consumeProjectId: [{ required: true, message: "请输入消费项目!" }],
+      },
+      url: {
+        add: "/business/busMarketMealCoupons/add",
+        edit: "/business/busMarketMealCoupons/edit",
+        queryById: "/business/busMarketMealCoupons/queryById",
+      },
+      stockTypeList: [],
+      mealCouponTypeList:[]
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    const hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
+    if (hotelInfo) {
+      this.model.hotelId = hotelInfo.id;
+    }
+    httpAction(
+      "/rooms/cesStockType/getTopTypes",
+      { hotelId: hotelInfo.id },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.stockTypeList = res.result;
+      }
+    });
+    httpAction(
+      "/rooms/cesMealCoupon/fetch",
+      { hotelId: hotelInfo.id },
+      "get"
+    ).then((res) => {
+      if (res.success) {
+        this.mealCouponTypeList = res.result;
+      }
+    });
+    //备份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>

+ 145 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsGenerateForm.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: "BusMarketMealCouponsGenerateForm",
+  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/busMarketMealCouponsUsed/generate",
+        edit: "/business/busMarketMealCouponsUsed/edit",
+        queryById: "/business/busMarketMealCouponsUsed/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/mealCoupons/BusMarketMealCouponsGenerateFormModal.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-meal-coupons-generate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-meal-coupons-generate-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketMealCouponsGenerateForm from './BusMarketMealCouponsGenerateForm'
+  export default {
+    name: 'BusMarketMealCouponsGenerateFormModal',
+    components: {
+      BusMarketMealCouponsGenerateForm
+    },
+    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>

+ 84 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsModal.Style#Drawer.vue

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

+ 352 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsUsedList.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.code"></j-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item label="">
+              <j-input
+                placeholder="姓名"
+                v-model="queryParam.user_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 :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"
+              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
+              >
+              <a-button
+                @click="handleAdd"
+                type="danger"
+                style="margin-left: 8px"
+                >生成餐券</a-button
+              >
+              <a-button
+                type="primary"
+                icon="delete"
+                style="margin-left: 8px"
+                @click="batchDel"
+                >批量删除</a-button
+              >
+            </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="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 v-if="record.statusName !== '已作废'" @click="handleEdit(record)"
+            >作废</a
+          >
+        </span>
+      </a-table>
+    </div>
+
+    <bus-market-meal-coupons-generate-form-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-meal-coupons-generate-form-modal>
+
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import BusMarketMealCouponsGenerateFormModal from "./BusMarketMealCouponsGenerateFormModal";
+import { httpAction, getAction } from "@/api/manage";
+
+export default {
+  name: "BusMarketCouponsUsedList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    BusMarketMealCouponsGenerateFormModal,
+  },
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      description: "餐券领取使用表管理页面",
+      // 表头
+      columns: [
+        {
+          title: "券号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "餐券名称",
+          align: "center",
+          dataIndex: "couponsName",
+        },
+        {
+          title: "姓名",
+          align: "center",
+          dataIndex: "userName",
+        },
+
+        {
+          title: "房间号",
+          align: "center",
+          dataIndex: "roomNumber",
+        },
+        {
+          title: "入住单号",
+          align: "center",
+          dataIndex: "checkedInNo",
+        },
+        {
+          title: "手机号",
+          align: "center",
+          dataIndex: "mobile",
+        },
+        {
+          title: "领取时间",
+          align: "center",
+          dataIndex: "gainTime",
+          // 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;
+          // },
+        },
+        {
+          title: "状态",
+          align: "center",
+          dataIndex: "statusName",
+        },
+        // {
+        //   title: "操作",
+        //   dataIndex: "action",
+        //   align: "center",
+        //   fixed: "right",
+        //   width: 80,
+        //   scopedSlots: { customRender: "action" },
+        // },
+      ],
+      url: {
+        list:
+          "/business/busMarketMealCouponsUsed/list?couponsId=" + this.couponsId,
+        delete: "/business/busMarketMealCouponsUsed/delete",
+        deleteBatch: "/business/busMarketMealCouponsUsed/deleteBatch",
+        exportXlsUrl: "/business/busMarketMealCouponsUsed/exportXls",
+        importExcelUrl: "business/busMarketMealCouponsUsed/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleEdit(item) {
+      var that = this;
+      this.$confirm({
+        title: "确认作废",
+        content: "是否作废?",
+        onOk: function () {
+          httpAction(
+            "/business/busMarketMealCouponsUsed/voided",
+            { id: item.id },
+            "put"
+          )
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                item.statusName = "已作废";
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {});
+        },
+        onCancel: function () {},
+      });
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({
+        type: "string",
+        value: "tenantId",
+        text: "关联租户",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "hotelId",
+        text: "关联酒店",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "couponsId",
+        text: "餐券id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "code",
+        text: "券号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "int",
+        value: "status",
+        text: "状态 0未领取 1已领取 2已使用 3已作废",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userid",
+        text: "会员id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userName",
+        text: "姓名",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "roomNumber",
+        text: "房间号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "checkedInNo",
+        text: "入住单号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "mobile",
+        text: "手机号",
+        dictCode: "",
+      });
+      fieldList.push({ type: "date", value: "gainTime", text: "领取时间" });
+      fieldList.push({ type: "date", value: "usedTime", text: "使用时间" });
+      this.superFieldList = fieldList;
+    },
+    handleAdd() {
+      this.$refs.modalForm.add(this.ipagination.total, this.couponsId);
+      this.$refs.modalForm.title = "优惠券生成";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 64 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsUsedListModal.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-meal-coupons-used-list :couponsId="couponsId" ref="modalMealCouponsUsedListModal"></bus-market-meal-coupons-used-list>
+  </j-modal>
+</template>
+
+<script>
+  import BusMarketMealCouponsUsedList from "./BusMarketMealCouponsUsedList";
+  export default {
+    name: 'BusMarketCouponsCashUsedListModal',
+    components: {
+      BusMarketMealCouponsUsedList
+    },
+    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.modalMealCouponsUsedListModal.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.modalMealCouponsUsedListModal.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 276 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsUsedVerify.vue

@@ -0,0 +1,276 @@
+<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="">
+              <a-input placeholder="房间号" v-model="queryParam.roomNumber"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <span
+              style="float: left; overflow: hidden"
+              class="table-page-search-submitButtons"
+            >
+              <a-button type="primary" @click="searchQuery" icon="search"
+                >查询</a-button
+              >
+              <a-button
+                type="primary"
+                @click="searchReset"
+                icon="reload"
+                style="margin-left: 8px"
+                >重置</a-button
+              >
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 查询区域-END -->
+
+    <!-- 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="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
+          >
+        </span>
+      </a-table>
+    </div>
+
+    <!-- <bus-market-meal-coupons-generate-form-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></bus-market-meal-coupons-generate-form-modal> -->
+  </a-card>
+</template>
+
+<script>
+import "@/assets/less/TableExpand.less";
+import { mixinDevice } from "@/utils/mixin";
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+// import BusMarketMealCouponsGenerateFormModal from "./BusMarketMealCouponsGenerateFormModal";
+import { httpAction, getAction } from "@/api/manage";
+
+export default {
+  name: "BusMarketCouponsUsedList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    // BusMarketMealCouponsGenerateFormModal,
+  },
+  props: {
+    couponsId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      description: "餐券领取使用表管理页面",
+      // 表头
+      columns: [
+        {
+          title: "券号",
+          align: "center",
+          dataIndex: "code",
+        },
+        {
+          title: "餐券名称",
+          align: "center",
+          dataIndex: "couponsName",
+        },
+        {
+          title: "金额",
+          align: "center",
+          dataIndex: "cost",
+        },
+        {
+          title: "房间号",
+          align: "center",
+          dataIndex: "roomNumber",
+        },
+        {
+          title: "操作",
+          dataIndex: "action",
+          align: "center",
+          fixed: "right",
+          width: 80,
+          scopedSlots: { customRender: "action" },
+        },
+      ],
+      url: {
+        list: "/business/busMarketMealCouponsUsed/list?status=1",
+        delete: "/business/busMarketMealCouponsUsed/delete",
+        deleteBatch: "/business/busMarketMealCouponsUsed/deleteBatch",
+        exportXlsUrl: "/business/busMarketMealCouponsUsed/exportXls",
+        importExcelUrl: "business/busMarketMealCouponsUsed/importExcel",
+      },
+      dictOptions: {},
+      superFieldList: [],
+    };
+  },
+  created() {
+    this.getSuperFieldList();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
+    },
+  },
+  methods: {
+    handleEdit(item) {
+      var that = this;
+      this.$confirm({
+        title: "确认核销",
+        content: "是否核销?",
+        onOk: function () {
+          httpAction(
+            "/business/busMarketMealCouponsUsed/verify",
+            { id: item.id },
+            "post"
+          )
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.reCalculatePage(1)
+                that.loadData();
+                that.$emit('fatherLoadData');
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {});
+        },
+        onCancel: function () {},
+      });
+    },
+    initDictConfig() {},
+    getSuperFieldList() {
+      let fieldList = [];
+      fieldList.push({
+        type: "string",
+        value: "tenantId",
+        text: "关联租户",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "hotelId",
+        text: "关联酒店",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "couponsId",
+        text: "餐券id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "code",
+        text: "券号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "int",
+        value: "status",
+        text: "状态 0未领取 1已领取 2已使用 3已作废",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userid",
+        text: "会员id",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "userName",
+        text: "姓名",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "roomNumber",
+        text: "房间号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "checkedInNo",
+        text: "入住单号",
+        dictCode: "",
+      });
+      fieldList.push({
+        type: "string",
+        value: "mobile",
+        text: "手机号",
+        dictCode: "",
+      });
+      fieldList.push({ type: "date", value: "gainTime", text: "领取时间" });
+      fieldList.push({ type: "date", value: "usedTime", text: "使用时间" });
+      this.superFieldList = fieldList;
+    },
+    handleAdd() {
+      this.$refs.modalForm.add(this.ipagination.total, this.couponsId);
+      this.$refs.modalForm.title = "优惠券生成";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+  },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 71 - 0
src/views/markets/modules/mealCoupons/BusMarketMealCouponsUsedVerifyModal.vue

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