Browse Source

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

gqx 2 years ago
parent
commit
e8cec305a1

+ 15 - 0
src/api/allDaysPriceRuleApi.js

@@ -0,0 +1,15 @@
+import api from './index'
+import { axios } from '@/utils/request'
+
+
+/**
+ * 获取全天房计费规则
+ * @returns 
+ */
+export function  fetch() { 
+    return axios({
+        url: '/rooms/cesAllDayPriceRule/fetch',
+        method: 'post',
+        params: {}
+    })
+ }

+ 14 - 5
src/views/markets/mealcouponsverify.vue

@@ -5,9 +5,9 @@
         <span slot="tab"> 全部 </span>
         <!-- <member-list></member-list> -->
       </a-tab-pane>
-      <a-tab-pane v-for="(item, index) in mealCouponTypeList" :key="item.value">
+      <a-tab-pane v-for="(item, index) in mealCouponTypeList" :key="item.id">
         <span slot="tab">
-          {{ item.label }}
+          {{ item.name }}
         </span>
         <!-- <market-recharge-list></market-recharge-list> -->
       </a-tab-pane>
@@ -191,10 +191,19 @@ export default {
     };
   },
   created() {
+    // httpAction(
+    //   "/rooms/cesMealCoupon/fetch",
+    //   { hotelId: hotelInfo.id },
+    //   "get"
+    // ).then((res) => {
+    //   if (res.success) {
+    //     this.mealCouponTypeList = res.result;
+    //   }
+    // });
     httpAction(
-      "/rooms/cesMealCoupon/fetch",
-      { hotelId: hotelInfo.id },
-      "get"
+            "/business/busMealCoupon/queryList",
+            { },
+            "get"
     ).then((res) => {
       if (res.success) {
         this.mealCouponTypeList = res.result;

+ 15 - 6
src/views/markets/modules/mealCoupons/BusMarketMealCouponsForm.vue

@@ -34,8 +34,8 @@
                 <a-select-option
                   v-for="(item, index) in mealCouponTypeList"
                   :key="index"
-                  :value="item.value"
-                  >{{ item.label }}</a-select-option
+                  :value="item.id"
+                  >{{ item.name }}</a-select-option
                 >
               </a-select>
             </a-form-model-item>
@@ -157,10 +157,19 @@ export default {
         this.stockTypeList = res.result;
       }
     });
+    // httpAction(
+    //   "/rooms/cesMealCoupon/fetch",
+    //   { hotelId: hotelInfo.id },
+    //   "get"
+    // ).then((res) => {
+    //   if (res.success) {
+    //     this.mealCouponTypeList = res.result;
+    //   }
+    // });
     httpAction(
-      "/rooms/cesMealCoupon/fetch",
-      { hotelId: hotelInfo.id },
-      "get"
+            "/business/busMealCoupon/queryList",
+            { hotelId: hotelInfo.id },
+            "get"
     ).then((res) => {
       if (res.success) {
         this.mealCouponTypeList = res.result;
@@ -209,4 +218,4 @@ export default {
     },
   },
 };
-</script>
+</script>

+ 48 - 4
src/views/settings/components/doorLockList.vue

@@ -12,6 +12,7 @@
                     <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>
+                            <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
                         </span>
                     </a-col>
                 </a-row>
@@ -62,6 +63,16 @@
                 <template slot="htmlSlot" slot-scope="text">
                     <div v-html="text"></div>
                 </template>
+                <template slot="numberSlot" slot-scope="text,record">
+                    <div style="display: flex;align-items: center">
+                        <a-form :form="form" :rules="validatorRules" style="width: 90%">
+                            <a-form-item prop="associationNumber" style="margin-bottom: 0px">
+                                <a-input v-model="text" @blur="(e)=>handleNumber(e,record)" />
+                            </a-form-item>
+                        </a-form>
+                        <!--                    <a-input v-model="text" placeholder="请输入关联号" @change="(e)=>handleNumber(e,record)" ></a-input>-->
+                    </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;"/>
@@ -113,6 +124,7 @@
     import { JeecgListMixin } from '@/mixins/JeecgListMixin'
     import doorLockModal from './modules/doorLockModal'
     import DoorLockBatchModal from "./modules/doorLockBatchModal";
+    import { httpAction, getAction } from '@/api/manage'
 
     export default {
         name: 'doorLockList',
@@ -129,22 +141,26 @@
                     {
                         title:'楼栋',
                         align:"center",
-                        dataIndex: 'buildName'
+                        dataIndex: 'buildName',
+                        width: 300
                     },
                     {
                         title:'楼层',
                         align:"center",
-                        dataIndex: 'floorName'
+                        dataIndex: 'floorName',
+                        width: 300
                     },
                     {
                         title:'房间号',
                         align:"center",
-                        dataIndex: 'roomNumber'
+                        dataIndex: 'roomNumber',
+                        width: 300
                     },
                     {
                         title:'关联号',
                         align:"center",
-                        dataIndex: 'associationNumber'
+                        dataIndex: 'associationNumber',
+                        scopedSlots: { customRender: 'numberSlot' },
                     },
                     {
                         title: '操作',
@@ -158,6 +174,7 @@
                 url: {
                     list: "/business/busDoorLock/list",
                     delete: "/business/busDoorLock/delete",
+                    edit: "/business/busDoorLock/edit",
                     deleteBatch: "/business/busDoorLock/deleteBatch",
                     exportXlsUrl: "/business/busDoorLock/exportXls",
                     importExcelUrl: "business/busDoorLock/importExcel",
@@ -165,6 +182,12 @@
                 },
                 dictOptions:{},
                 superFieldList:[],
+                form: this.$form.createForm(this),
+                validatorRules: {
+                    associationNumber: [
+                        {required: true, message: '请输入关联号!'},
+                    ],
+                },
             }
         },
         created() {
@@ -195,6 +218,27 @@
                 this.$refs.modalBatchForm.title = "批量添加";
                 this.$refs.modalBatchForm.disableSubmit = false;
             },
+            handleNumber(e,record){
+                console.log(e)
+                console.log(record)
+
+                var data = record;
+                data.associationNumber = e.target.value;
+                const that = this;
+                that.confirmLoading = true;
+                let httpurl = this.url.edit;
+                let method = 'put';
+                httpAction(httpurl, data, 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>

+ 244 - 16
src/views/settings/components/roomModules/allDaysRoomFeeRule.vue

@@ -9,9 +9,10 @@
         :rules="validatorRules"
         slot="detail"
       >
+        <!-- 1 -->
         <div class="item-wrapper">
           <div class="wrapper-content">1、进店时间在</div>
-          <div class="wrapper-form-item">
+          <div class="wrapper-form-item" style="width: 128px">
             <a-form-model-item
               label=""
               :labelCol="labelCol"
@@ -39,20 +40,191 @@
           </div>
         </div>
 
-        <a-form-model-item
-          label=""
-          :labelCol="labelCol"
-          :wrapperCol="wrapperCol"
-          prop="ass"
-        >
-          <a-input v-model="model.ass"></a-input>
-        </a-form-model-item>
+        <!-- 2 -->
+        <div class="item-wrapper">
+          <div class="wrapper-content">2、全天房中午退房时间</div>
+          <div class="wrapper-form-item">
+            <a-form-model-item
+              label=""
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="leaveTime"
+            >
+              <a-time-picker
+                :open.sync="open2"
+                v-model="model.leaveTime"
+                format="HH:mm"
+              >
+                <a-button
+                  slot="addon"
+                  size="small"
+                  type="primary"
+                  @click="open2 = false"
+                >
+                  确定
+                </a-button>
+              </a-time-picker>
+            </a-form-model-item>
+          </div>
+          <div class="wrapper-content">,超时则</div>
+          <div class="wrapper-form-item">
+            <a-form-model-item
+              label=""
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="timeOutRule"
+            >
+              <a-select
+                default-value="1"
+                style="width: 150px"
+                v-model="model.timeOutRule"
+              >
+                <a-select-option
+                  :value="item.value"
+                  v-for="item in rulesMap"
+                  :key="item.value"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </div>
+          <div class="wrapper-content">,直到</div>
+          <div class="wrapper-form-item">
+            <a-form-model-item
+              label=""
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="endTime"
+            >
+              <a-time-picker
+                :open.sync="open3"
+                v-model="model.endTime"
+                format="HH:mm"
+              >
+                <a-button
+                  slot="addon"
+                  size="small"
+                  type="primary"
+                  @click="open3 = false"
+                >
+                  确定
+                </a-button>
+              </a-time-picker>
+            </a-form-model-item>
+          </div>
+          <div class="wrapper-content">,加收全天房费</div>
+        </div>
+
+        <!-- 按分钟加收规则 -->
+        <div v-if="model.timeOutRule == 1">
+          <a-form-model-item
+            label=""
+            :labelCol="labelCol"
+            :wrapperCol="wrapperCol"
+            prop="ruleType"
+          >
+            <a-radio-group
+              name="radioGroup"
+              :default-value="1"
+              v-model="model.ruleType"
+            >
+              <a-radio :value="1"> 统一设置 </a-radio>
+              <a-radio :value="2"> 根据房型设置 </a-radio>
+            </a-radio-group>
+          </a-form-model-item>
+          <!-- 统一配置分钟房费加收 -->
+          <div class="item-wrapper" v-if="model.timeOutRule == 1 && model.ruleType == 1">
+            <div class="wrapper-content">超时之后,每隔</div>
+            <div class="wrapper-form-item" style="width: 98px">
+              <a-form-model-item
+                label=""
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="minute"
+              >
+                <a-input-number :min="1" v-model="model.minute"></a-input-number>
+              </a-form-model-item>
+            </div>
+            <div class="wrapper-content">
+              分钟收取
+            </div>
+            <div class="wrapper-form-item" style="width: 98px">
+              <a-form-model-item
+                label=""
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="price"
+              >
+                <a-input-number :min="0" v-model="model.price"></a-input-number>
+              </a-form-model-item>
+            </div>
+            <div class="wrapper-content">
+              元,不足 {{ model.minute }} 分钟,超过
+            </div>
+            <div class="wrapper-form-item" style="width: 98px">
+              <a-form-model-item
+                label=""
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="moreThenMinute"
+              >
+                <a-input-number :min="0" v-model="model.moreThenMinute"></a-input-number>
+              </a-form-model-item>
+            </div>
+            <div class="wrapper-content">
+              分钟加收
+            </div>
+            <div class="wrapper-form-item" style="width: 98px">
+              <a-form-model-item
+                label=""
+                :labelCol="labelCol"
+                :wrapperCol="wrapperCol"
+                prop="moreThenPrice"
+              >
+                <a-input-number :min="0" v-model="model.moreThenPrice"></a-input-number>
+              </a-form-model-item>
+            </div>
+            <div class="wrapper-content">
+              元。
+            </div>
+          </div>
+          <!-- 按房型配置分钟房费加收 -->
+          <div class="item-wrapper" v-if="model.timeOutRule == 1 && model.ruleType == 2">
+
+          </div>
+        </div>
+
+        <!-- 3 -->
+        <div class="item-wrapper">
+          <div class="wrapper-content">3、全天房超过退房时间可以再宽限</div>
+          <div class="wrapper-form-item" style="width: 98px">
+            <a-form-model-item
+              label=""
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="dayTime"
+            >
+              <a-input-number
+                v-model="model.dayTime"
+                style="width: 100px"
+              ></a-input-number>
+            </a-form-model-item>
+          </div>
+          <div class="wrapper-content">分钟</div>
+        </div>
+        <div class="buttons">
+          <a-button style="margin-right: 10px" @click="reload">刷新</a-button>
+          <a-button type="primary" @click="save">保存</a-button>
+        </div>
       </a-form-model>
     </j-form-container>
   </a-spin>
 </template>
 
 <script>
+import { fetch } from "@/api/allDaysPriceRuleApi";
+import { getAllLayouts } from '@/api/roomLayout'
 export default {
   data() {
     return {
@@ -65,30 +237,86 @@ export default {
         sm: { span: 24 },
       },
       open1: false,
+      open2: false,
+      open3: false,
       enterTime: "",
       confirmLoading: false,
+      rulesMap: [
+        {
+          name: "按分钟加收房费",
+          value: 1,
+        },
+        {
+          name: "按半天房费加收",
+          value: 2,
+        },
+
+        {
+          name: "不加收房费",
+          value: 3,
+        },
+      ],
+      layouts: [],
       model: {
         enterTime: null,
-        ass: null,
+        timeOutRule: 1,
+        leaveTime: null,
+        endTime: null,
+        dayTime: null,
+        ruleType: 1,
+        layoutRules: [],
+        minute: null,
+        price: null,
+        moreThenMinute: null,
+        moreThenPrice: null
       },
       validatorRules: {
         enterTime: [
           {
             required: true,
-            message: "进!",
+            message: "进店时间在多少分钟之后的,算第二天退房不能为空!",
           },
         ],
-        ass: [{ required: true, message: "测试" }],
+        leaveTime: [{ required: true, message: "退房时间不能为空" }],
+        dayTime: [{ required: true, message: "超时宽限多少分钟不能为空" }],
       },
     };
   },
+  mounted() {
+    this.loadLayouts()
+    this.loadRules();
+  },
+  methods: {
+    loadLayouts() {
+        getAllLayouts().then(res => {
+            if(res.code == 200) {
+                res.result.records.forEach
+                this.layouts = res.result.records
+            } 
+        })
+    },
+    loadRules() {
+      fetch().then((res) => {});
+    },
+    reload() {},
+    save() {},
+  },
 };
 </script>
 
 <style lang="css" scoped>
-.item-wrapper{
-    display: flex;
-    align-items: center;
-    height: 50px;
+/deep/ .ant-form-explain {
+  width: 300% !important;
+}
+.item-wrapper {
+  display: flex;
+  align-items: center;
+  height: 50px;
+  margin-top: 22px;
+  margin-bottom: 22px;
+}
+.wrapper-form-item {
+  height: 38px;
+  /* margin-top: 22px; */
 }
 </style>

+ 311 - 0
src/views/settings/components/roomModules/mealCouponList.vue

@@ -0,0 +1,311 @@
+<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 :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>
+                          <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('餐券')">导出</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>
+        <span slot="switchAutoSlot" slot-scope="text,record">
+          <a-switch checked-children="开启" un-checked-children="禁用"
+                    default-checked :checked="text == 0" @change="e=>onAutoChange(e,record)" />
+        </span>
+        <span slot="switchSlot" slot-scope="text,record">
+          <a-switch checked-children="开启" un-checked-children="禁用"
+                    default-checked :checked="text == 0" @change="e=>onStatusChange(e,record)" />
+        </span>
+        <template slot="startSlot" slot-scope="text,record">
+          <div style="display: flex;align-items: center">
+            <a-form style="width: 90%">
+              <a-form-item prop="startTime" style="margin-bottom: 0px">
+                <a-time-picker format="HH:mm" :minuteStep="5" :default-value="moment(text, 'HH:mm')"
+                               :allowClear="false" @openChange="e=>onStartOpen(e,record)" @change="event=>onStartChange(event)" />
+              </a-form-item>
+            </a-form>
+            <!--                    <a-input v-model="text" placeholder="请输入关联号" @change="(e)=>handleNumber(e,record)" ></a-input>-->
+          </div>
+        </template>
+        <template slot="endSlot" slot-scope="text,record">
+          <div style="display: flex;align-items: center">
+            <a-form style="width: 90%">
+              <a-form-item prop="associationNumber" style="margin-bottom: 0px">
+                <a-form-item prop="startTime" style="margin-bottom: 0px">
+                  <a-time-picker format="HH:mm" :minuteStep="5" :default-value="moment(text, 'HH:mm')"
+                                 :allowClear="false" @openChange="e=>onEndOpen(e,record)" @change="e=>onEndChange(e)" />
+                </a-form-item>
+              </a-form-item>
+            </a-form>
+            <!--                    <a-input v-model="text" placeholder="请输入关联号" @change="(e)=>handleNumber(e,record)" ></a-input>-->
+          </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>
+
+    <meal-coupon-modal ref="modalForm" @ok="modalFormOk"></meal-coupon-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import mealCouponModal from './modules/mealCouponModal'
+  import moment from 'moment';
+  import { httpAction, getAction } from '@/api/manage'
+
+  export default {
+    name: 'mealCouponList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      mealCouponModal
+    },
+    data () {
+      return {
+        description: '餐券管理页面',
+        // 表头
+        columns: [
+          {
+            title:'餐券类型名称',
+            align:"center",
+            dataIndex: 'name'
+          },
+          {
+            title:'是否自动发放',
+            align:"center",
+            dataIndex: 'automaticGrant',
+            // customRender:function (text) {
+            //   return text==1?'true':'false'
+            // },
+            scopedSlots: { customRender: 'switchAutoSlot' },
+          },
+          {
+            title:'是否启用',
+            align:"center",
+            dataIndex: 'status',
+            // customRender:function (text) {
+            //   return text==1?'true':'false'
+            // },
+            scopedSlots: { customRender: 'switchSlot' },
+          },
+          {
+            title:'开始时间',
+            align:"center",
+            dataIndex: 'startTime',
+            scopedSlots: { customRender: 'startSlot' },
+          },
+          {
+            title:'结束时间',
+            align:"center",
+            dataIndex: 'endTime',
+            scopedSlots: { customRender: 'endSlot' },
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/business/busMealCoupon/list",
+          delete: "/business/busMealCoupon/delete",
+          deleteBatch: "/business/busMealCoupon/deleteBatch",
+          exportXlsUrl: "/business/busMealCoupon/exportXls",
+          importExcelUrl: "business/busMealCoupon/importExcel",
+          edit: "/business/busMealCoupon/edit",
+        },
+        dictOptions:{},
+        superFieldList:[],
+        startTime:'',
+        endTime:''
+      }
+    },
+    created() {
+    this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      moment,
+      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:'int',value:'automaticGrant',text:'自动发放(0-开启;1-关闭)'})
+        fieldList.push({type:'date',value:'startTime',text:'开始时间'})
+        fieldList.push({type:'date',value:'endTime',text:'结束时间'})
+        fieldList.push({type:'int',value:'status',text:'状态(0-开启;1-关闭)'})
+        fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+        this.superFieldList = fieldList
+      },
+      onAutoChange(e,record){
+        console.log(e)
+        console.log(record)
+        let data = { ...record }
+        if (e) {
+          data.automaticGrant = 0;
+        } else {
+          data.automaticGrant = 1;
+        }
+        this.update(data)
+      },
+      onStatusChange(e,record){
+        console.log(e)
+        console.log(record)
+        let data = { ...record }
+        if (e) {
+          data.status = 0;
+        } else {
+          data.status = 1;
+        }
+        this.update(data)
+      },
+      onStartOpen(e,record){
+        if (!e){
+          //关闭时间选择面板
+          let data = { ...record }
+          if (data.startTime != this.startTime){
+            data.startTime = this.startTime;
+            this.update(data)
+          }
+
+        }
+      },
+      onStartChange(e){
+        this.startTime = moment(new Date(e)).format('HH:mm:ss')
+      },
+      onEndOpen(e,record){
+        if (!e){
+          //关闭时间选择面板
+          let data = { ...record }
+          if (data.endTime != this.endTime){
+            data.endTime = this.endTime;
+            this.update(data)
+          }
+
+        }
+      },
+      onEndChange(e){
+        this.endTime = moment(new Date(e)).format('HH:mm:ss')
+      },
+      update(data){
+        const that = this;
+        httpAction(this.url.edit, data, 'put').then((res) => {
+          if (res.success) {
+            that.$message.success(res.message);
+            that.$emit('ok');
+            that.loadData();
+          } else {
+            that.$message.warning(res.message);
+          }
+        }).finally(() => {
+          that.confirmLoading = false;
+        })
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

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

@@ -0,0 +1,175 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="餐券类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input v-model="model.name" placeholder="请输入餐券类型名称"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    label="自动发放"
+                    prop="automaticGrant">
+              <a-switch checkedChildren="开启" unCheckedChildren="禁用" v-model="model.automaticGrant"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+                    :labelCol="labelCol"
+                    :wrapperCol="wrapperCol"
+                    label="启用"
+                    prop="status">
+              <a-switch checkedChildren="开启" unCheckedChildren="禁用" v-model="model.status"/>
+            </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-time-picker format="HH:mm" :minuteStep="5" v-model="model.startTime" @change="onChange" />
+            </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-time-picker format="HH:mm" :minuteStep="5" v-model="model.endTime" @change="onChange" />
+            </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'
+  import moment from 'moment';
+
+  export default {
+      name: 'BusMealCouponForm',
+      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: '请输入餐券名称!'},
+                  ],
+              },
+              url: {
+                  add: "/business/busMealCoupon/add",
+                  edit: "/business/busMealCoupon/edit",
+                  queryById: "/business/busMealCoupon/queryById"
+              }
+          }
+      },
+      computed: {
+          formDisabled() {
+              return this.disabled
+          },
+      },
+      created() {
+          //备份model原始值
+          this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      },
+      methods: {
+          moment,
+          add() {
+              this.edit(this.modelDefault);
+          },
+          edit(record) {
+              this.model = Object.assign({}, record);
+              this.visible = true;
+              if (this.model.status == 0) {
+                  this.model.status = true;
+              } else {
+                  this.model.status = false;
+              }
+
+              if (this.model.automaticGrant == 0) {
+                  this.model.automaticGrant = true;
+              } else {
+                  this.model.automaticGrant = false;
+              }
+
+              if (!this.model.id) {
+                  // this.model.startTime = moment('06:00', "HH:mm")
+                  // this.model.endTime = moment("09:00", "HH:mm")
+              }else{
+                  this.model.startTime = moment(record.startTime, "HH:mm")
+                  this.model.endTime = moment(record.endTime, "HH:mm")
+              }
+          },
+          submitForm() {
+              const that = this;
+              // 触发表单验证
+              console.log(that.model)
+              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';
+                      }
+                      let data = { ...that.model }
+                      if (this.model.status) {
+                          data.status = 0;
+                      } else {
+                          data.status = 1;
+                      }
+                      if (this.model.automaticGrant) {
+                          data.automaticGrant = 0;
+                      } else {
+                          data.automaticGrant = 1;
+                      }
+                      data.startTime = this.model.startTime.format("HH:mm:ss")
+                      data.endTime = this.model.endTime.format("HH:mm:ss")
+                      httpAction(httpurl, data, method).then((res) => {
+                          if (res.success) {
+                              that.$message.success(res.message);
+                              that.$emit('ok');
+                          } else {
+                              that.$message.warning(res.message);
+                          }
+                      }).finally(() => {
+                          that.confirmLoading = false;
+                      })
+                  }
+
+              })
+          },
+          onChange() {
+
+          }
+      }
+  }
+</script>

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

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

+ 109 - 0
src/views/settings/components/roomModules/modules/serviceRepairCategoryForm.vue

@@ -0,0 +1,109 @@
+<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-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: 'serviceRepairCategoryForm',
+    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: '请输入分类名称!'},
+           ],
+        },
+        url: {
+          add: "/business/busServiceRepairCategory/add",
+          edit: "/business/busServiceRepairCategory/edit",
+          queryById: "/business/busServiceRepairCategory/queryById"
+        }
+      }
+    },
+    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.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;
+            })
+          }
+
+        })
+      },
+    }
+  }
+</script>

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

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

+ 172 - 0
src/views/settings/components/roomModules/modules/serviceRepairForm.vue

@@ -0,0 +1,172 @@
+<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="类型(1-服务;2-维修)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">-->
+<!--              <a-input-number v-model="model.type" placeholder="请输入类型(1-服务;2-维修)" style="width: 100%" />-->
+<!--            </a-form-model-item>-->
+            <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
+              <j-dict-select-tag type="radio" v-model="model.type" placeholder="请选择类型" dictCode="service_repair_type"
+                                 @change="e=>handleChangeType(e)" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-show="model.type == 1" >
+<!--            <a-form-model-item label="服务模块(1-物品;2-服务内容)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="serviceType">-->
+<!--              <a-input-number v-model="model.serviceType" placeholder="请输入服务模块(1-物品;2-服务内容)" style="width: 100%" />-->
+<!--            </a-form-model-item>-->
+            <a-form-model-item label="服务模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="serviceType">
+              <j-dict-select-tag type="radio" v-model="model.serviceType" placeholder="请选择服务模块" dictCode="service_module"
+                                 @change="e=>handleChangeServiceType(e)" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24" v-show="model.type == 1 && model.serviceType == 1">
+<!--            <a-form-model-item label="关联物品分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">-->
+<!--              <a-input v-model="model.categoryId" placeholder="请输入关联物品分类"  ></a-input>-->
+<!--            </a-form-model-item>-->
+            <a-form-model-item label="物品分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryId">
+<!--              <a-input v-model="model.categoryId" placeholder="请输入关联物品分类"  ></a-input>-->
+              <a-select
+                      show-search
+                      placeholder="请物品分类"
+                      v-model="model.categoryId"
+                      option-filter-prop="children"
+              >
+                <a-select-option v-for="item in categoryData" :key="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: 'serviceRepairForm',
+    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: '请选择类型!'},
+           ],
+        },
+        url: {
+          add: "/business/busServiceRepair/add",
+          edit: "/business/busServiceRepair/edit",
+          queryById: "/business/busServiceRepair/queryById",
+          queryCategoryData: "/business/busServiceRepairCategory/queryList"
+        },
+        categoryData:[]
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //备份model原始值
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+      getAction(this.url.queryCategoryData,{}).then((res)=>{
+        if(res.success){
+          this.categoryData = res.result
+        }else{
+
+        }
+      })
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        if (!record.id){
+          record.type = 1;
+          record.serviceType = 1;
+        }
+        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';
+              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;
+            })
+          }
+
+        })
+      },
+      handleChangeType(e){
+        if (e != 1){
+          this.model.serviceType = 0
+          this.model.categoryId = '';
+        }
+      },
+      handleChangeServiceType(e){
+        if (e != 1){
+          this.model.categoryId = '';
+        }
+      }
+    }
+  }
+</script>

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

@@ -0,0 +1,84 @@
+<template>
+  <a-drawer
+    :title="title"
+    :width="width"
+    placement="right"
+    :closable="false"
+    @close="close"
+    destroyOnClose
+    :visible="visible">
+    <service-repair-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></service-repair-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 serviceRepairForm from './serviceRepairForm'
+
+  export default {
+    name: 'serviceRepairModal',
+    components: {
+      serviceRepairForm
+    },
+    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/roomModules/modules/serviceRepairModal.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="关闭">
+    <service-repair-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></service-repair-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import serviceRepairForm from './serviceRepairForm'
+  export default {
+    name: 'serviceRepairModal',
+    components: {
+      serviceRepairForm
+    },
+    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>

+ 197 - 0
src/views/settings/components/roomModules/serviceRepairCategoryList.vue

@@ -0,0 +1,197 @@
+<template>
+  <j-modal
+          :title="title"
+          :width="width"
+          :visible="visible"
+          switchFullscreen
+          @ok="handleOk"
+          :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+          @cancel="handleCancel"
+          cancelText="关闭">
+    <a-card :bordered="false">
+      <!-- 查询区域 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+          </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-button @click="batchDel" type="danger" icon="delete">批量删除</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>
+
+      <service-repair-category-modal ref="modalForm" @ok="modalFormOk"></service-repair-category-modal>
+    </a-card>
+  </j-modal>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import serviceRepairCategoryModal from './modules/serviceRepairCategoryModal'
+
+  export default {
+    name: 'serviceRepairCategoryList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      serviceRepairCategoryModal
+    },
+    data () {
+      return {
+        description: '服务维修-物品分类管理页面',
+        // 表头
+        columns: [
+          {
+            title:'分类名称',
+            align:"center",
+            dataIndex: 'name'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/business/busServiceRepairCategory/list",
+          delete: "/business/busServiceRepairCategory/delete",
+          deleteBatch: "/business/busServiceRepairCategory/deleteBatch",
+          exportXlsUrl: "/business/busServiceRepairCategory/exportXls",
+          importExcelUrl: "business/busServiceRepairCategory/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    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:'int',value:'status',text:'状态(0-禁用;1-启用)'})
+        fieldList.push({type:'int',value:'delFlag',text:'删除状态(0-正常,1-已删除)'})
+        this.superFieldList = fieldList
+      },
+      show () {
+        this.visible=true
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 243 - 0
src/views/settings/components/roomModules/serviceRepairList.vue

@@ -0,0 +1,243 @@
+<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 :md="4" :sm="6">
+            <a-form-item>
+              <a-select
+                      :maxTagCount="1"
+                      mode="multiple"
+                      v-model="queryParam.hotelId"
+                      placeholder="商家名称"
+                      :allowClear="true"
+              >
+                <a-select-option :value="item.id" v-for="(item,index) in hotelList" :key="index">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="4" :sm="6">
+            <a-form-item>
+              <j-dict-select-tag v-model="queryParam.type" placeholder="请选择类型" dictCode="service_repair_type"/>
+            </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>
+                            <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('服务维修')">导出</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-button @click="batchDel" type="danger" icon="delete">批量删除</a-button>
+      </a-dropdown>
+      <a-button @click="handleCategory" icon="gold">物品分类管理</a-button>
+    </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>
+
+    <service-repair-modal ref="modalForm" @ok="modalFormOk"></service-repair-modal>
+    <service-repair-category-list ref="modalCategoryList"></service-repair-category-list>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import serviceRepairModal from './modules/serviceRepairModal'
+  import ServiceRepairCategoryList from "./serviceRepairCategoryList";
+  import {hotelQueryList} from "../../../../api/hotel";
+
+  export default {
+    name: 'serviceRepairList',
+    mixins: [JeecgListMixin, mixinDevice],
+    components: {
+      ServiceRepairCategoryList,
+      serviceRepairModal
+    },
+    data() {
+      return {
+        description: '服务维修管理页面',
+        // 表头
+        columns: [
+          {
+            title: '商家',
+            align: "center",
+            dataIndex: 'hotelName'
+          },
+          {
+            title: '名称',
+            align: "center",
+            dataIndex: 'name'
+          },
+          {
+            title: '类型',
+            align: "center",
+            dataIndex: 'type_dictText',
+            // customRender:function (text) {
+            //   return text==1?'服务':'维修'
+            // },
+          },
+          {
+            title: '模块',
+            align: "center",
+            dataIndex: 'serviceType_dictText',
+            // customRender:function (text) {
+            //   return text==1?'物品':'服务内容'
+            // },
+          },
+          {
+            title: '分类名称',
+            align: "center",
+            dataIndex: 'categoryName'
+          },
+          {
+            title: '时间',
+            align: "center",
+            dataIndex: 'createTime'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align: "center",
+            fixed: "right",
+            width: 147,
+            scopedSlots: {customRender: 'action'}
+          }
+        ],
+        url: {
+          list: "/business/busServiceRepair/list",
+          delete: "/business/busServiceRepair/delete",
+          deleteBatch: "/business/busServiceRepair/deleteBatch",
+          exportXlsUrl: "/business/busServiceRepair/exportXls",
+          importExcelUrl: "business/busServiceRepair/importExcel",
+
+        },
+        dictOptions: {},
+        superFieldList: [],
+        hotelList: [],
+      }
+    },
+    created() {
+      this.getSuperFieldList();
+      hotelQueryList({
+        key: ''
+      }).then(res => {
+        console.log(res)
+        if (res.code == 200 && res.result) {
+          this.hotelList = res.result;
+        }
+      })
+    },
+    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: 'int', value: 'type', text: '类型(1-服务;2-维修)'})
+        fieldList.push({type: 'int', value: 'serviceType', text: '服务模块(1-物品;2-服务内容)'})
+        fieldList.push({type: 'string', value: 'categoryId', text: '关联物品分类'})
+        fieldList.push({type: 'int', value: 'delFlag', text: '删除状态(0-正常,1-已删除)'})
+        this.superFieldList = fieldList
+      },
+      handleCategory() {
+        console.log('物品分类')
+        this.$refs.modalCategoryList.show();
+        this.$refs.modalCategoryList.title = "物品分类管理";
+        this.$refs.modalCategoryList.disableSubmit = true;
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 38 - 2
src/views/settings/roomSettings.vue

@@ -21,7 +21,7 @@
                     <a-icon type="shop" />
                     商品库存
                 </span>
-               <goodList></goodList>     
+               <goodList></goodList>
             </a-tab-pane>
             <a-tab-pane key="4">
                 <span slot="tab">
@@ -36,6 +36,38 @@
                     钟点房计费
                 </span>
             </a-tab-pane>
+            <a-tab-pane key="6">
+                <span slot="tab">
+                    <a-icon type="file" />
+                    房价方案
+                </span>
+            </a-tab-pane>
+            <a-tab-pane key="7">
+                <span slot="tab">
+                    <a-icon type="thunderbolt" />
+                    水电煤设置
+                </span>
+            </a-tab-pane>
+            <a-tab-pane key="8">
+                <span slot="tab">
+                    <a-icon type="tool" />
+                    服务维修设置
+                </span>
+                <service-repair-list></service-repair-list>
+            </a-tab-pane>
+            <a-tab-pane key="9">
+                <span slot="tab">
+                    <a-icon type="flag" />
+                    销售目标设置
+                </span>
+            </a-tab-pane>
+            <a-tab-pane key="10">
+                <span slot="tab">
+                    <a-icon type="pound" />
+                    餐券设置
+                </span>
+                <meal-coupon-list></meal-coupon-list>
+            </a-tab-pane>
         </a-tabs>
     </a-card>
 </template>
@@ -45,8 +77,12 @@ import roomLayoutList from "./components/roomModules/roomLayoutList.vue"
 import goodList from "./components/roomModules/goodList.vue";
 import roomNumList from "./components/roomModules/roomNumSettings/roomNumList.vue";
 import allDaysRule from './components/roomModules/allDaysRoomFeeRule.vue'
+import MealCouponList from "./components/roomModules/mealCouponList";
+import ServiceRepairList from "./components/roomModules/serviceRepairList";
 export default {
     components: {
+        ServiceRepairList,
+        MealCouponList,
         roomLayoutList,
         goodList,
         roomNumList,
@@ -61,4 +97,4 @@ export default {
 </script>
 
 <style scoped>
-</style>
+</style>