Explorar o código

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

gqx %!s(int64=2) %!d(string=hai) anos
pai
achega
6dc5ba794b

+ 18 - 0
src/api/roomLayout.js

@@ -0,0 +1,18 @@
+import api from './index'
+import { axios } from '@/utils/request'
+
+/**
+ * 启用状态(App)
+ * @param {String||Number} parameter layoutId
+ * @returns Axios Promise
+ */
+export function modifyAppState(parameter) {
+    return axios({
+        url: '/rooms/cesRoomLayout/modifyAppState/'+parameter.id+"?hotelId="+parameter.hotelId+"&state="+(parameter.appState?0:1),
+        method: 'put',
+        data: parameter
+    })
+}
+
+
+

+ 19 - 0
src/api/roomLayoutPrice.js

@@ -0,0 +1,19 @@
+import api from './index'
+import { axios } from '@/utils/request'
+import Axios from 'axios'
+
+/**
+ * 获取房型价格列表
+ * @param {object} parameter 参数
+ * @returns Axios Promise
+ */
+export function list(parameter) {
+    return axios({
+        url: '/rooms/cesRoomLayoutPrice/list',
+        method: 'get',
+        params: parameter
+    })
+}
+
+
+

+ 5 - 0
src/utils/request.js

@@ -143,6 +143,11 @@ service.interceptors.request.use(config => {
 
 // response interceptor
 service.interceptors.response.use((response) => {
+    if(response.data.code != 200) {
+      if(response.data.message) {
+        Vue.prototype.$Jnotification.error({ message: '提示', description: response.data.message,duration: 4})
+      }
+    }
     return response.data
   }, err)
 

+ 2 - 2
src/views/hotel/entry.vue

@@ -264,7 +264,7 @@ export default {
 .list-items {
     width: 100%;
     display: flex;
-    justify-content: center;
+    justify-content: start;
     align-items: center;
     flex-wrap: wrap;
 }
@@ -272,7 +272,7 @@ export default {
 .list-item {
     width: 40%;
     height: 120px;
-    margin: 10px auto;
+    margin: 10px 50px;
     display: flex;
     padding: 8px;
     border: 1px solid #CCCCCC88;

+ 60 - 0
src/views/settings/components/roomModules/RoomLayoutFormModal.vue

@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    <bus-market-member-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></bus-market-member-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import BusMarketMemberForm from './roomLayoutForm'
+  export default {
+    name: 'BusMarketMemberModal',
+    components: {
+      BusMarketMemberForm
+    },
+    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>

+ 58 - 0
src/views/settings/components/roomModules/RoomLayoutPriceModal.vue

@@ -0,0 +1,58 @@
+<template>
+    <j-modal :title="raw ? ('[' + raw.name + ']-->房价管理') : '房价管理'" :width="width" :visible="visible" switchFullscreen @ok="handleOk"
+        :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
+        <a-tabs
+        default-active-key="1"
+        tab-position="left"
+        :style="{ height: '200px' }"
+      >
+        <a-tab-pane  tab="全天房" key="1">
+            <room-qtf-price-table v-if="raw" :layout-id="raw.id"></room-qtf-price-table>
+        </a-tab-pane>
+        <a-tab-pane  tab="钟点房" key="2">
+222
+        </a-tab-pane>
+      </a-tabs>
+    </j-modal>
+</template>
+
+<script>
+import RoomQtfPriceTable from './RoomQtfPriceTable.vue';
+export default {
+    components:{
+        RoomQtfPriceTable
+    },
+    data() {
+        return {
+            width: '90%',
+            visible: false,
+            disableSubmit: false,
+            raw: null
+        };
+    },
+
+    mounted() {
+        
+    },
+
+    methods: {
+        handleOk() {
+            console.log(1)
+        },
+        handleCancel() {
+            this.visible = false
+        },
+        setRaw(layoutId, title) {
+            this.raw = {
+                id: layoutId,
+                name: title
+            }
+        }
+
+    },
+};
+</script>
+
+<style lang="stylus" scoped>
+
+</style>

+ 179 - 0
src/views/settings/components/roomModules/RoomQtfPriceTable.vue

@@ -0,0 +1,179 @@
+<template>
+    <div>
+        <a-table :columns="columns" :data-source="data"  :pagination="false" :loading="loading">
+            <span slot="prepay" slot-scope="text, record, index">
+                <a-switch checked-children="是" un-checked-children="否" :checked="record.prepay" @change="changePrepay(record)"/>
+              </span>
+              <span slot="isVip" slot-scope="text, record, index">
+                <a-switch checked-children="是" un-checked-children="否" :checked="record.isVip" />
+              </span>
+              <span slot="action" slot-scope="text, record">
+                <a @click="handleEdit(record)">编辑</a>
+    
+                <a-divider type="vertical" />
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                    <a>删除</a>
+                </a-popconfirm>
+            </span>
+        </a-table>
+        <a-form-model layout="inline" ref="form" :model="model" :rules="validatorRules" slot="detail">
+            <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-form-model-item label="原价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oprice">
+                <a-input-number style="width:100%;" v-model="model.oprice" :min="1"  placeholder="请填写原价"/>
+            </a-form-model-item>
+            <a-form-model-item label="现价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="price">
+                <a-input-number style="width:100%;" v-model="model.oprice" :min="1"  placeholder="请填写现价"/>
+            </a-form-model-item>
+            <a-form-model-item label="预付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="prepay">
+                <a-radio-group v-model="model.prepay">
+                    <a-radio :value="1">
+                      是
+                    </a-radio>
+                    <a-radio :value="0">
+                      否
+                    </a-radio>                    
+                  </a-radio-group>
+            </a-form-model-item>
+            <a-form-model-item label="积分" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="integral">
+                <a-input-number style="width:100%;" v-model="model.integral"  placeholder="请填写积分"/>
+            </a-form-model-item>
+            <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
+                <a-input-number style="width:100%;" v-model="model.num"  placeholder="请填写数量"/>
+            </a-form-model-item>
+            <a-form-model-item label="会员折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isVip">
+                <a-radio-group v-model="model.isVip">
+                    <a-radio :value="1">
+                      是
+                    </a-radio>
+                    <a-radio :value="0">
+                      否
+                    </a-radio>                    
+                  </a-radio-group>
+            </a-form-model-item>
+        </a-form-model>
+    </div>
+</template>
+
+<script>
+import { list } from '@/api/roomLayoutPrice'
+
+const columns = [
+    {
+        title: '房价名称',
+        dataIndex: 'name',
+        key: 'name',
+    },
+    {
+        title: '原价',
+        dataIndex: 'oprice',
+        key: 'oprice',
+    },
+    {
+        title: '现价',
+        dataIndex: 'price',
+        key: 'price',
+    },
+    {
+        title: '预付',
+        key: 'prepay',
+        dataIndex: 'prepay',
+        scopedSlots: { customRender: 'prepay' },
+    },
+    {
+        title: '积分',
+        dataIndex: 'integral',
+        key: 'integral',
+    },
+    {
+        title: '数量',
+        dataIndex: 'num',
+        key: 'num',
+    },
+    {
+        title:'使用会员折扣',
+        dataIndex: 'isVip',
+        key: 'isVip',
+        scopedSlots: { customRender: 'isVip' },
+    },
+    {
+        title: '操作',
+        key: 'action',
+        scopedSlots: { customRender: 'action' },
+    },
+];
+let hotelItem = JSON.parse(window.localStorage.getItem('storeInfo'))
+export default {
+    props: {
+        layoutId: null
+    },
+    data() {
+        return {
+            labelCol: {
+                xs: { span: 24 },
+                sm: { span: 8 },
+            },
+            wrapperCol: {
+                xs: { span: 24 },
+                sm: { span: 16 },
+            },
+            loading: false,
+            data: [],
+            columns,
+            searchType: 1,
+            validatorRules: {
+                name: [{ required: true, message: "请输入房价名称!" }],
+                oprice: [{ required: true, message: "请填写原价价!" }],
+                price: [{ required: true, message: "请填写现价!" }],
+                integral: [{ required: true, message: "请填写积分!" }],
+                lunchNum: [{ required: true, message: "请填写中餐数量!" }],
+                dinnerNum: [{ required: true, message: "请填写晚餐数量!" }],
+            },
+            model: {
+                id: '',
+                name: '',
+                oprice: null,
+                price: null,
+                prepay: 0,
+                integral: 0,
+                num: 0,
+            }
+        };
+    },
+
+    mounted() {
+        this.getData()
+    },
+
+    methods: {
+        changePrepay(record) {
+            
+        },
+        getData() {
+            this.loading = true
+            list({
+                type: this.searchType,
+                hotelId: hotelItem.id,
+                roomLayoutId: this.layoutId,
+                pageNo: 1,
+                pageSize: 999
+            }).then(res=>{
+                this.loading = false
+                console.log(res)
+                this.data = res.result.records
+            }).catch(res=>{
+                this.loading = false
+            })
+        },
+        handleDelete(id) {
+
+        }
+
+    },
+};
+</script>
+
+<style lang="stylus" scoped>
+
+</style>

+ 29 - 0
src/views/settings/components/roomModules/roomGen.vue

@@ -0,0 +1,29 @@
+<template>
+    <div>
+        实现功能
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'HotelSaasTenantFrontendRoomGen',
+
+    data() {
+        return {
+            
+        };
+    },
+
+    mounted() {
+        
+    },
+
+    methods: {
+        
+    },
+};
+</script>
+
+<style lang="stylus" scoped>
+
+</style>

+ 173 - 0
src/views/settings/components/roomModules/roomLayoutForm.vue

@@ -0,0 +1,173 @@
+<template>
+    <a-spin :spinning="confirmLoading">
+        <j-form-container :disabled="formDisabled">
+            <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+                <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-form-model-item label="门市价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="marketPrice">
+                    <a-input-number style="width:50%;" v-model="model.marketPrice" :min="1"  placeholder="请填写门市价"/>
+                </a-form-model-item>
+                
+                <a-form-model-item label="可住人数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="canLivePersonNum">
+                    <a-input-number style="width:50%;" v-model="model.canLivePersonNum" :min="0"  placeholder="请填写可住人数"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="早餐数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="breakfastNum">
+                    <a-input-number style="width:50%;" v-model="model.breakfastNum" :min="0"  placeholder="请填写早餐数量"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="中餐数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lunchNum">
+                    <a-input-number style="width:50%;" v-model="model.lunchNum" :min="0"  placeholder="请填写中餐数量"/>
+                </a-form-model-item>
+
+                <a-form-model-item label="晚餐数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dinnerNum">
+                    <a-input-number style="width:50%;" v-model="model.dinnerNum" :min="0"  placeholder="请填写晚餐数量"/>
+                </a-form-model-item>
+            </a-form-model>
+
+        </j-form-container>
+    </a-spin>
+</template>
+
+<script>
+import { getRoomPlans, getSelectList } from "@/api/api";
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+
+export default {
+    name: "BusMarketMemberForm",
+    props: {
+        disabled: {
+            type: Boolean,
+            default: false,
+            required: false,
+        },
+    },
+    data() {
+        return {
+            model: {
+                id: "",
+                hotelId: 0,
+                name: null,
+                marketPrice: null,
+                canLivePersonNum: 0,
+                breakfastNum: 0,
+                lunchNum: 0,
+                dinnerNum: 0
+            },
+            labelCol: {
+                xs: { span: 24 },
+                sm: { span: 5 },
+            },
+            wrapperCol: {
+                xs: { span: 24 },
+                sm: { span: 16 },
+            },
+            confirmLoading: false,
+            validatorRules: {
+                name: [{ required: true, message: "请输入房型!" }],
+                marketPrice: [{ required: true, message: "请填写门市价!" }],
+                canLivePersonNum: [{ required: true, message: "请填写可住人数!" }],
+                breakfastNum: [{ required: true, message: "请填写早餐数量!" }],
+                lunchNum: [{ required: true, message: "请填写中餐数量!" }],
+                dinnerNum: [{ required: true, message: "请填写晚餐数量!" }],
+            },
+            url: {
+                add: "/rooms/cesRoomLayout/save",
+                edit: "/rooms/cesRoomLayout/modify",
+                queryById: "/rooms/cesRoomLayout/queryById",
+            },
+            iconChooseVisible: false,
+            roomPlans: [],
+            members: [],
+        };
+    },
+    computed: {
+        formDisabled() {
+            return this.disabled;
+        },
+    },
+    created() {
+        var _info = JSON.parse(localStorage.getItem("storeInfo"));
+        if (_info) {
+            this.model.hotelId = _info.id;
+            this.initData();
+        }
+        this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+        initData() {
+            getRoomPlans(this.model.hotelId, null).then((res) => {
+                if (res.success) {
+                    this.roomPlans = res.result;
+                }
+            });
+
+        },
+        selectIcons() {
+            this.iconChooseVisible = true;
+        },
+        handleIconCancel() {
+            this.iconChooseVisible = false;
+        },
+        handleIconChoose(value) {
+            console.log(value);
+            this.model.icon = value;
+            this.iconChooseVisible = false;
+        },
+        add() {
+            this.edit(this.modelDefault);
+        },
+        edit(record) {
+            this.model = Object.assign({}, record);
+            this.visible = true;
+            getSelectList({ id: this.model.id }).then((res) => {
+                if (res.success) {
+                    this.members = res.result;
+                }
+            });
+        },
+        submitForm() {
+            const that = this;
+            // 触发表单验证
+            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";
+                    }
+                    if (this.model.payFlag == 0) {
+                        this.model.payAmount = 0;
+                    }
+                    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>
+<style scoped>
+.avatar-uploader>.ant-upload {
+    width: 104px;
+    height: 104px;
+}
+</style>

+ 313 - 0
src/views/settings/components/roomModules/roomLayoutList.vue

@@ -0,0 +1,313 @@
+<template>
+    <a-card :bordered="false">
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                    <a-col :span="6">
+                        <a-form-item label="房型名称">
+                            <j-input placeholder="房型名称" v-model="queryParam.name" style="width: 200px"></j-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                            <a-button type="primary" @click="searchReset" icon="reload"
+                                style="margin-left: 8px">重置</a-button>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+                <a-button style="margin-left: 8px">
+                    批量操作 <a-icon type="down" /></a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- table区域-begin -->
+        <div>
+            <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px">
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
+        <a style="font-weight: 600">{{ selectedRowKeys.length }}</a
+        >项
+        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+      </div> -->
+
+            <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
+                :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="{
+                    selectedRowKeys: selectedRowKeys,
+                    onChange: onSelectChange,
+                }" class="j-table-force-nowrap" @change="handleTableChange">
+                <template slot="stateSlot" slot-scope="text, record, index">
+                    <a-switch checked-children="开" un-checked-children="关" default-checked :checked="record.state == 1"
+                        @change="changeState" />
+                </template>
+                <template slot="appStateSlot" slot-scope="text, record, index">
+                    <a-switch checked-children="开" un-checked-children="关" default-checked
+                        :checked="record.appState == 1" @change="changeAppState($event, record)" />
+                </template>
+                <template slot="pictureSlot" slot-scope="text, record, index">
+                    <img :src="record.picture" style="width:40px;height40px;" />
+                </template>
+                <template slot="htmlSlot" slot-scope="text">
+                    <div v-html="text"></div>
+                </template>
+                <template slot="imgSlot" slot-scope="text, record">
+                    <span v-if="!text" style="font-size: 12px; font-style: italic">无图片</span>
+                    <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
+                        style="max-width: 80px; font-size: 12px; font-style: italic" />
+                </template>
+                <template slot="fileSlot" slot-scope="text">
+                    <span v-if="!text" style="font-size: 12px; font-style: italic">无文件</span>
+                    <a-button v-else :ghost="true" type="primary" icon="download" size="small"
+                        @click="downloadFile(text)">
+                        下载
+                    </a-button>
+                </template>
+
+                <span slot="action" slot-scope="text, record">
+                    <a @click="handleEdit(record)">编辑</a>
+
+                    <a-divider type="vertical" />
+                    <a-dropdown>
+                        <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
+                        <a-menu slot="overlay">
+                            <a-menu-item>
+                                <a @click="handlePriceManager(record)">价格管理</a>
+                            </a-menu-item>
+                            <a-menu-item>
+                                <a @click="handleInfo(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>
+        <room-layout-form ref="modalForm" @ok="modalFormOk"></room-layout-form>
+        <room-layout-price-modal ref="priceModal" @ok="onPriceSave"></room-layout-price-modal>
+    </a-card>
+</template>
+  
+<script>
+
+import { JeecgListMixin } from "@/mixins/JeecgListMixin";
+import roomLayoutForm from "./RoomLayoutFormModal"; // todo roomLayoutForm 需要替换成房型的表单弹窗
+
+import RoomLayoutPriceModal from "./RoomLayoutPriceModal.vue";
+
+import { modifyAppState } from '@/api/roomLayout'
+import { filterObj } from "@/utils/util";
+let hotelInfo = JSON.parse(localStorage.getItem('storeInfo'))
+export default {
+    name: "roomLayoutList",
+    mixins: [JeecgListMixin],
+    components: {
+        roomLayoutForm,
+        RoomLayoutPriceModal,
+    },
+    data() {
+        return {
+            queryParam: {},
+            // 分页参数
+            ipagination: {
+                current: 1,
+                pageSize: 10,
+                pageSizeOptions: ["10", "20", "30"],
+                showTotal: (total, range) => {
+                    return range[0] + "-" + range[1] + " 共" + total + "条";
+                },
+                showQuickJumper: true,
+                showSizeChanger: true,
+                total: 0,
+            },
+            // 表头
+            columns: [
+                {
+                    title: "商家",
+                    align: "center",
+                    dataIndex: "hotelName",
+                },
+                {
+                    title: "房型大图",
+                    align: "center",
+                    dataIndex: "cover",
+                    scopedSlots: { customRender: "pictureSlot" },
+                },
+                {
+                    title: "房型名字",
+                    align: "center",
+                    dataIndex: "name",
+
+                },
+                {
+                    title: "门市价",
+                    align: "center",
+                    dataIndex: "marketPrice",
+                },
+                {
+                    title: "可住人数",
+                    align: "center",
+                    dataIndex: "canLivePersonNum",
+                },
+                {
+                    title: "房间数",
+                    align: "center",
+                    dataIndex: "num",
+                },
+                {
+                    title: "状态",
+                    align: "center",
+                    dataIndex: "state",
+                    scopedSlots: { customRender: "stateSlot" },
+                },
+
+                {
+                    title: "APP",
+                    align: "center",
+                    dataIndex: "appState",
+                    scopedSlots: { customRender: "appStateSlot" },
+                },
+                {
+                    title: "操作",
+                    dataIndex: "action",
+                    align: "center",
+                    fixed: "right",
+                    width: 147,
+                    scopedSlots: { customRender: "action" },
+                },
+            ],
+            url: {
+                // list: 'org.jeecg.modules.business/busMarketMember/list',
+                list: "/rooms/cesRoomLayout/list?hotelId="+hotelInfo.id,
+                delete: "/rooms/cesRoomLayout/remove",
+                deleteBatch: "/rooms/cesRoomLayout/deleteBatch",
+                exportXlsUrl: "/rooms/cesRoomLayout/exportXls",
+                importExcelUrl:
+                    "rooms/cesRoomLayout/importExcel",
+            },
+            dictOptions: {},
+            superFieldList: [],
+            selectedRowKeys: [],
+            isorter: {
+                column: "createTime",
+                order: "desc",
+            },
+        };
+    },
+    created() {
+        // this.loadData()
+    },
+    methods: {
+        onPriceSave() {
+
+        },
+        handlePriceManager(record) {
+            this.$refs.priceModal.setRaw(record.id, record.name)
+            this.$refs.priceModal.visible = true
+        },
+        changeState(e) {
+            console.log(e)
+        },
+        changeAppState(e, param) {
+
+            modifyAppState(param).then(res => {
+                if (res.code == 200) {
+                    this.loadData();
+                }
+            })
+        },
+        getAvatarView: function (avatar) {
+            return getFileAccessHttpUrl(avatar);
+        },
+
+        batchFrozen: function (status) {
+            if (this.selectedRowKeys.length <= 0) {
+                this.$message.warning("请选择一条记录!");
+                return false;
+            } else {
+                let ids = "";
+                let that = this;
+                let isAdmin = false;
+                that.selectionRows.forEach(function (row) {
+                    if (row.username == "admin") {
+                        isAdmin = true;
+                    }
+                });
+                if (isAdmin) {
+                    that.$message.warning("管理员账号不允许此操作,请重新选择!");
+                    return;
+                }
+                that.selectedRowKeys.forEach(function (val) {
+                    ids += val + ",";
+                });
+                that.$confirm({
+                    title: "确认操作",
+                    content: "是否" + (status == 1 ? "解冻" : "冻结") + "选中账号?",
+                    onOk: function () {
+                        frozenBatch({ ids: ids, status: status }).then((res) => {
+                            if (res.success) {
+                                that.$message.success(res.message);
+                                that.loadData();
+                                that.onClearSelected();
+                            } else {
+                                that.$message.warning(res.message);
+                            }
+                        });
+                    },
+                });
+            }
+        },
+        handleMenuClick(e) {
+            if (e.key == 1) {
+                this.batchDel();
+            } else if (e.key == 2) {
+                this.batchFrozen(2);
+            } else if (e.key == 3) {
+                this.batchFrozen(1);
+            }
+        },
+        handleFrozen: function (id, status, username) {
+            let that = this;
+            //TODO 后台校验管理员角色
+            if ("admin" == username) {
+                that.$message.warning("管理员账号不允许此操作!");
+                return;
+            }
+            frozenBatch({ ids: id, status: status }).then((res) => {
+                if (res.success) {
+                    that.$message.success(res.message);
+                    that.loadData();
+                } else {
+                    that.$message.warning(res.message);
+                }
+            });
+        },
+        handleChangePassword(username) {
+            this.$refs.passwordmodal.show(username);
+        },
+        passwordModalOk() {
+            //TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
+        },
+        onSyncFinally({ isToLocal }) {
+            // 同步到本地时刷新下数据
+            if (isToLocal) {
+                this.loadData();
+            }
+        },
+    },
+};
+</script>
+<style scoped>
+@import "~@assets/less/common.less";
+</style>

+ 45 - 0
src/views/settings/roomSettings.vue

@@ -0,0 +1,45 @@
+<template>
+    <a-card style="width: 100%; height:100%;">
+        <a-tabs default-active-key="1">
+            <a-tab-pane key="1">
+                <span slot="tab">
+                    <a-icon type="picture" />
+                    房型列表
+                </span>
+                <room-layout-list></room-layout-list>
+            </a-tab-pane>
+            <a-tab-pane key="2">
+                <span slot="tab">
+                    <a-icon type="audit" />
+                    房号设置
+                </span>
+                <room-gen></room-gen>
+            </a-tab-pane>
+            <a-tab-pane key="3">
+                <span slot="tab">
+                    <a-icon type="shop" />
+                    商品库存
+                </span>
+            </a-tab-pane>
+        </a-tabs>
+    </a-card>
+</template>
+
+<script>
+import roomLayoutList from "./components/roomModules/roomLayoutList.vue"
+import roomGen from "./components/roomModules/roomGen.vue";
+export default {
+    components: {
+        roomLayoutList,
+        roomGen
+    },
+    data() {
+        return {
+
+        }
+    }
+}
+</script>
+
+<style scoped>
+</style>