Browse Source

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

DESKTOP-B78GIPM\admin 2 years ago
parent
commit
c6af9e471d

+ 23 - 2
src/views/markets/agreementunit.vue

@@ -108,8 +108,9 @@
                 </template>
 
                 <span slot="action" slot-scope="text, record">
+                     <a @click="toBilling(record)">账务管理</a>
+                    <a-divider type="vertical" />
           <a @click="handleEdit(record)">编辑</a>
-
           <a-divider type="vertical" />
           <a-dropdown>
             <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@@ -143,6 +144,8 @@
     import AgreementUnitDetailModal from './modules/agreementUnit/agreementUnitDetailModal'
     import { httpAction, getAction } from '@/api/manage'
 
+
+
     export default {
         name: 'agreementunit',
         mixins:[JeecgListMixin, mixinDevice],
@@ -183,7 +186,10 @@
                     {
                         title:'记账额度',
                         align:"center",
-                        dataIndex: 'bookkeeping'
+                        dataIndex: 'bookkeeping',
+                        customRender:function (text) {
+                            return (text == null || text == 0 ? "无限制" : text)
+                        }
                     },
                     {
                         title:'已用额度',
@@ -330,6 +336,21 @@
                 this.$refs.modalDetailForm.title="详情";
                 this.$refs.modalDetailForm.disableSubmit = true;
             },
+            toBilling(record){
+                var url = '/tenant/marketinfo/agreementaccount';//'markets/agreementunit/agreementAccount';
+                //缓存选择的协议id
+                console.log(record)
+                localStorage.setItem("agreementUnitInfo", JSON.stringify(record))
+                this.$router.push({
+                    path:url
+                });
+                // this.$router.push({
+                //     // path: "/room/scheduledetail",
+                //     // query: { id: e },
+                //     name: "markets/agreementunit/agreementAccount",
+                //     params: { id: record.id },
+                // });
+            }
         }
     }
 </script>

+ 130 - 0
src/views/markets/modules/agreementUnit/agreementAccount.vue

@@ -0,0 +1,130 @@
+<template>
+    <a-card class="container">
+        <div class="info">
+            <a-row :gutter="[16,16]">
+                <a-col :span="4" class="padding_8">
+                    <div class="title">
+                        协议单位
+                    </div>
+                    <div class="value">
+                        {{agreementUnitInfo.customerName}}
+                        <a-tag color="cyan">
+                            {{agreementUnitInfo.accountStatus_dictText}}
+                        </a-tag>
+                    </div>
+                </a-col>
+                <a-col :span="3" class="padding_8">
+                    <div class="title">
+                        客户类型
+                    </div>
+                    <div class="value">
+                        {{agreementUnitInfo.customerType_dictText}}
+                    </div>
+                </a-col>
+                <a-col :span="3" class="padding_8">
+                    <div class="title">
+                        消费
+                    </div>
+                    <div class="value">
+                        {{accountModel.consume}}
+                    </div>
+                </a-col>
+                <a-col :span="3" class="padding_8">
+                    <div class="title">
+                        收款
+                    </div>
+                    <div class="value">
+                        {{accountModel.payment}}
+                    </div>
+                </a-col>
+                <a-col :span="3" class="padding_8">
+                    <div class="title">
+                        记账额度
+                    </div>
+                    <div class="value">
+                        {{agreementUnitInfo.bookkeeping == null || agreementUnitInfo.bookkeeping == 0?'无限制':agreementUnitInfo.bookkeeping}}
+                    </div>
+                </a-col>
+                <a-col :span="4" class="padding_8">
+                    <div class="title">
+                        已用额度
+                    </div>
+                    <div class="value">
+                        {{accountModel.used}}
+                    </div>
+                </a-col>
+                <a-col :span="4" class="bak_red padding_8 border_radius_10">
+                    <div class="title">
+                        剩余额度
+                    </div>
+                    <div class="value">
+                        {{accountModel.surplus}}
+                    </div>
+                </a-col>
+            </a-row>
+        </div>
+        <div class="oper">
+
+        </div>
+        <div class="cotent">
+
+        </div>
+    </a-card>
+</template>
+
+<script>
+    export default {
+        name: 'agreementAccount',
+        data:{
+            agreementUnitInfo:{},
+            accountModel:{
+                consume:'0',
+                payment:'0',
+                used:'0',
+                surplus:'0'
+            }
+        },
+        activated(){
+            console.log(99999)
+            var agreementUnitInfo = JSON.parse(localStorage.getItem("agreementUnitInfo"));
+            this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
+            this.$forceUpdate()
+        },
+        created() {
+            var agreementUnitInfo = JSON.parse(localStorage.getItem("agreementUnitInfo"));
+            this.agreementUnitInfo = Object.assign({}, agreementUnitInfo);
+
+            var temp = {
+                consume:'0',
+                payment:'0',
+                used:'0',
+                surplus:'0'
+            }
+            this.accountModel = Object.assign({}, temp);
+            // console.log(agreementUnitInfo.customerName)
+        }
+    }
+</script>
+
+<style scoped>
+    .info{
+        text-align: center;
+    }
+    .title {
+        font-size: 16px;
+        font-weight: 500;
+    }
+    .value{
+        padding-top: 10px;
+    }
+    .bak_red{
+        background-color: red;
+    }
+    .padding_8{
+        padding: 8px 0;
+        border-radius: 10px;
+    }
+    .border_radius_10{
+        border-radius: 10px;
+    }
+</style>

+ 12 - 2
src/views/markets/modules/agreementUnit/agreementUnitDetailForm.vue

@@ -275,7 +275,7 @@
                     佣金
                 </div>
                 <div v-if="activeMneu == 5">
-                    入住记录
+                    <check-in-list :agreementModel="model"></check-in-list>
                 </div>
             </div>
         </div>
@@ -288,10 +288,11 @@
     import '@/assets/less/TableExpand.less'
     import CustomerList from './details/customerList'
     import ContactsList from './details/contactsList'
+    import CheckInList from './details/checkInList'
 
     export default {
         name: 'agreementUnitDetailForm',
-        components: { ContactsList, CustomerList },
+        components: { CheckInList, ContactsList, CustomerList },
         computed: {
             formDisabled(){
                 return this.disabled
@@ -367,10 +368,19 @@
                     editOther: "/business/busMarketAgreementUnit/editOther",
                     queryById: "/business/busMarketAgreementUnit/queryById",
                     query_saleList: "/business/busSalesPerson/queryList",
+                    listCheckInRecord: "/business/busMarketAgreementUnit/listCheckInRecord",
                 },
             };
         },
         created() {
+            getAction(this.url.listCheckInRecord,{}).then((res)=>{
+                console.log(res)
+                if(res.success){
+                    //res.result
+                }else{
+
+                }
+            })
         },
         methods: {
             add() {

+ 280 - 0
src/views/markets/modules/agreementUnit/details/checkInList.vue

@@ -0,0 +1,280 @@
+<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="24">
+                        <a-form-item>
+                            <div>
+                                <div class="item-content">
+                                    <div class="list-container">
+                                        <div class="list-item" v-for="(item, index) in dateList" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
+                                            {{ item }}
+                                        </div>
+                                    </div>
+                                    <div>
+                                        <a-range-picker v-show="activeIndex==3" @change="onChange"/>
+                                    </div>
+                                </div>
+                            </div>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="6">
+                        <a-form-item>
+                            <a-input placeholder="房间号" v-model="queryParam.roomNumber" allowClear></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="6">
+                        <a-form-item>
+                            <a-input placeholder="客人姓名" v-model="queryParam.customerName" allowClear></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="12" :sm="24">
+                        <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+                            <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                            <a-button type="primary" @click="searchReset" icon="reload"
+                                      style="margin-left: 8px">重置</a-button>
+<!--                            <a-button style="margin-left: 8px" type="primary" icon="download" @click="handleExportXls('bus_market_agreement_customer_info')">导出</a-button>-->
+<!--                            <a-upload  name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
+<!--                                <a-button  style="margin-left: 8px" type="primary" icon="import">导入</a-button>-->
+<!--                            </a-upload>-->
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+        </div>
+        <!-- 查询区域-END -->
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+
+        </div>
+
+        <!-- table区域-begin -->
+        <div>
+            <a-table
+                    ref="table"
+                    size="middle"
+                    :scroll="{x:true}"
+                    bordered
+                    rowKey="orderNumber"
+                    :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="priceSlot" slot-scope="text,record">
+                    <a-button type="primary">
+                        查看
+                    </a-button>
+                </template>
+            </a-table>
+        </div>
+    </a-card>
+</template>
+
+<script>
+    import '@/assets/less/TableExpand.less'
+    import { mixinDevice } from '@/utils/mixin'
+    import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+    import moment from 'dayjs'
+
+    export default {
+        name: 'checkInList',
+        mixins:[JeecgListMixin, mixinDevice],
+        props: {
+            agreementModel:{
+                type: Object,
+                required: false,
+                default: () => {
+                }
+            }
+        },
+        data() {
+            return {
+                dateList: ['今天', '昨日', '本周', '更多'],
+                activeIndex: 0,
+                queryParam: {
+                    agreementId:this.agreementModel.id,
+                    startDate:moment(new Date()).format('YYYY-MM-DD'),
+                    endDate:moment(new Date()).format('YYYY-MM-DD')
+                },
+                columns:[
+                    {
+                        title: '单号',
+                        align: "center",
+                        dataIndex: 'orderNumber'
+                    },
+                    {
+                        title: '房间号',
+                        align: "center",
+                        dataIndex: 'roomNumber'
+                    },
+                    {
+                        title: '房价',
+                        align: "center",
+                        dataIndex: 'housePrice'
+                    },
+                    {
+                        title: '入住时间',
+                        align: "center",
+                        dataIndex: 'arrivalTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '离店时间',
+                        align: "center",
+                        dataIndex: 'dueOutTime',
+                        customRender: function (text) {
+                            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
+                        }
+                    },
+                    {
+                        title: '入住天数',
+                        align: "center",
+                        dataIndex: 'dayCount'
+                    },
+                    {
+                        title: '入住类型',
+                        align: "center",
+                        dataIndex: 'checkinType',
+                        customRender: function (text) {
+                            return !text ? "" : (text==1 ?"全天房" : "钟点房")
+                        }
+                    },
+                    {
+                        title: '状态',
+                        align: "center",
+                        dataIndex: 'status'
+                    },
+                    {
+                        title: '客人姓名',
+                        align: "center",
+                        dataIndex: 'customerName'
+                    },
+                    {
+                        title: '总消费',
+                        align: "center",
+                        dataIndex: 'totalPrice'
+                    },
+                ],
+                url: {
+                    list: "/business/busMarketAgreementUnit/listCheckInRecord",
+                    delete: "/business/busMarketAgreementCustomer/delete",
+                    deleteBatch: "/business/busMarketAgreementCustomer/deleteBatch",
+                    exportXlsUrl: "/business/busMarketAgreementCustomer/exportXls",
+                    importExcelUrl: "business/busMarketAgreementCustomer/importExcel",
+
+                },
+                dictOptions: {},
+                superFieldList: [],
+            }
+        },
+        computed: {
+            importExcelUrl: function(){
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            },
+        },
+        methods:{
+            handleClick(index) {
+                this.activeIndex = index
+                // this.searchQuery()
+                console.log(index)
+                let td = moment().format('YYYY-MM-DD')
+                switch (index) {
+                    case 0:
+                        console.log('今天')
+                        let today = moment(new Date()).format('YYYY-MM-DD')
+                        this.queryParam.startDate = today;
+                        this.queryParam.endDate = today;
+                        break;
+                    case 1:
+                        console.log('昨天')
+                        let btd = moment(new Date()).subtract(1, 'days').format('YYYY-MM-DD')
+                        this.queryParam.startDate = btd;
+                        this.queryParam.endDate = btd;
+                        break;
+                    case 2:
+                        console.log('本周')
+                        // const weekStart = moment().startOf('week').add(1, 'days').format('YYYY-MM-DD'); //本周开始的日期
+                        // const weekBefore = moment(moment().startOf('week').add(1, 'days')).subtract(7,'days').format('YYYY-MM-DD');   // 近七日日期
+
+                        // 获取当前时间
+                        var currentDate = new Date();
+                        // 返回date是一周中的某一天
+                        var week = currentDate.getDay()
+                        // 返回date是一个月中的某一天
+                        // var month = currentDate.getDate()
+                        // 一天的毫秒数
+                        var millisecond = 1000 * 60 * 60 * 24
+                        // 减去的天数
+                        var minusDay = week !== 0 ? week - 1 : 6
+                        // alert(minusDay);
+                        // 本周 周一
+                        var monday = new Date(currentDate.getTime() - (minusDay * millisecond))
+                        // 本周 周日
+                        var sunday = new Date(monday.getTime() + (6 * millisecond))
+
+                        this.queryParam.startDate = moment(monday).format('YYYY-MM-DD');// 本周起始时间
+                        this.queryParam.endDate = moment(sunday).format('YYYY-MM-DD');// 本周终止时间
+                        break;
+                }
+                this.loadData(1);
+            },
+            formatDate (date) {
+                // 格式化时间为yyyy-mm-dd
+                var d = new Date(date)
+                var month = '' + (d.getMonth() + 1)
+                var day = '' + d.getDate()
+                var year = d.getFullYear()
+                if (month.length < 2) month = '0' + month
+                if (day.length < 2) day = '0' + day
+                return [year, month, day].join('-')
+            },
+            onChange(){
+
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    .item-content{
+        display: flex;
+        flex-direction: row;
+        /*align-items: center;*/
+        /*justify-items: center;*/
+    }
+    .list-container {
+        display: grid;
+        grid-template-columns: 1fr 1fr 1fr 1fr;
+        border: solid 1px #d9d9d9;
+        width: 260px;
+        border-radius: 5px;
+        margin-right: 10px;
+        overflow: hidden;
+        /*height: 32px;*/
+        /*line-height: 32px;*/
+    }
+
+    .list-item {
+        padding: 0px;
+        border-right: solid 1px #d9d9d9;
+        cursor: pointer;
+        text-align: center;
+    }
+
+    .list-item.active {
+        background-color: #1890ff;
+        color: #fff;
+    }
+</style>

+ 210 - 12
src/views/room/fangtailive.vue

@@ -34,29 +34,47 @@
               </a-button> </a-dropdown
             ><a-button
               style="margin-bottom: 10px"
-              @click="handleAdd"
-              disabled
+              @click="handleClean"
+              :disabled="cleanDisabled"
               type="danger"
               >置干净</a-button
             ><a-button
               style="margin-bottom: 10px"
-              @click="handleAdd"
+              @click="handleDirty"
               type="danger"
-              disabled
+              :disabled="dirtyDisabled"
               >置脏</a-button
-            ><a-button
+            >
+            <a-button
+              v-if="wxCompleteBtn"
               style="margin-bottom: 10px"
-              @click="handleAdd"
-              disabled
+              @click="handleCompleteRepair"
+              type="danger"
+              >完成维修</a-button
+            >
+            <a-button
+              v-else
+              style="margin-bottom: 10px"
+              @click="handleWx"
+              :disabled="lockDisabled"
               type="danger"
               >置维修</a-button
+            >
+            <a-button
+              v-if="offLockBtn"
+              style="margin-bottom: 10px"
+              @click="handleOffLock"
+              type="danger"
+              >解锁</a-button
             ><a-button
+              v-else
               style="margin-bottom: 10px"
-              @click="handleAdd"
-              disabled
+              @click="handleLock"
+              :disabled="lockDisabled"
               type="danger"
               >锁房</a-button
-            ><a-button
+            >
+            <a-button
               disabled
               style="margin-bottom: 10px"
               @click="handleAdd"
@@ -565,7 +583,7 @@
     <template v-else-if="activeKey === '7'">
       <membergoodsmanage></membergoodsmanage>
     </template>
-    <upkeep-room-modal ref="modalForm" @ok="modalFormOk"></upkeep-room-modal>
+    <upkeep-room-modal ref="modalForm" @ok="modalWxFormOk"></upkeep-room-modal>
     <bill-room-info-modal
       ref="ModalBillRoomInfo"
       @ok="modalFormOk"
@@ -586,6 +604,14 @@
       ref="ModalEditScheduleRoom"
       @ok="modalFormOk"
     ></edit-schedule-room-modal>
+    <lock-room-modal
+      ref="ModalLockRoom"
+      @ok="modalLockRoomFormOk"
+    ></lock-room-modal>
+    <clean-room-modal
+      ref="ModalCleanRoom"
+      @ok="modalLockRoomFormOk"
+    ></clean-room-modal>
   </a-card>
 </template>
 
@@ -593,13 +619,15 @@
 import "@/assets/less/TableExpand.less";
 // import { mixinDevice } from "@/utils/mixin";
 // import { JeecgListMixin } from "@/mixins/JeecgListMixin";
-import { httpAction, getAction } from "@/api/manage";
+import { httpAction, getAction, postAction } from "@/api/manage";
 import UpkeepRoomModal from "./modules/upkeep/UpkeepRoomModal.vue";
 import BillRoomInfoModal from "./modules/checkIn/BillRoomInfoModal.vue";
 import BillRoomFormModal from "./modules/checkIn/BillRoomFormModal.vue";
 import ScheduleRoomModal from "./modules/schedule/ScheduleRoomModal.vue";
 import ScheduleTeamRoomModal from "./modules/scheduleTeam/ScheduleRoomModal.vue";
 import EditScheduleRoomModal from "./modules/schedule/EditScheduleRoomModal.vue";
+import LockRoomModal from "./modules/lock/LockRoomModal.vue";
+import CleanRoomModal from "./modules/clean/CleanRoomModal.vue";
 import calendarfangtai from "./calendarfangtai";
 import forwardfangtai from "./forwardfangtai";
 import guestorders from "./guestorders";
@@ -626,6 +654,8 @@ export default {
     leasegoods,
     membermessage,
     membergoodsmanage,
+    LockRoomModal,
+    CleanRoomModal,
   },
   data() {
     return {
@@ -705,6 +735,45 @@ export default {
       console.log("activeKey", key);
     },
   },
+  computed: {
+    lockDisabled() {
+      return !this.roomList.some((t) =>
+        t.rooms.some((c) => c.roomInfo.state === 88)
+      );
+    },
+    offLockBtn() {
+      return this.roomList.some((t) =>
+        t.rooms.some(
+          (c) => c.roomInfo.state === 88 && c.roomInfo.roomStatus === 6
+        )
+      );
+    },
+    wxCompleteBtn() {
+      return this.roomList.some((t) =>
+        t.rooms.some(
+          (c) => c.roomInfo.state === 88 && c.roomInfo.roomStatus === 5
+        )
+      );
+    },
+    cleanDisabled() {
+      return !this.roomList.some((t) =>
+        t.rooms.some(
+          (c) =>
+            c.roomInfo.state === 88 &&
+            (c.roomInfo.roomStatus === 2 || c.roomInfo.roomStatus === 4)
+        )
+      );
+    },
+    dirtyDisabled() {
+      return !this.roomList.some((t) =>
+        t.rooms.some(
+          (c) =>
+            c.roomInfo.state === 88 &&
+            (c.roomInfo.roomStatus === 1 || c.roomInfo.roomStatus === 3)
+        )
+      );
+    },
+  },
   created() {
     // 禁用右键
     // document.oncontextmenu = new Function("event.returnValue=false");
@@ -1063,6 +1132,135 @@ export default {
       this.$refs.modalForm.title = "维修";
       this.$refs.modalForm.disableSubmit = false;
     },
+    modalWxFormOk() {
+      this.loadData();
+    },
+    handleWx() {
+      var selectRoom = [];
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
+          }
+        });
+      });
+      if (selectRoom.length === 0) {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      console.log("selectRoom", selectRoom);
+      this.$refs.modalForm.add({ roomRepairList: selectRoom });
+      this.$refs.modalForm.title = "维修";
+      this.$refs.modalForm.disableSubmit = false;
+    },
+    handleLock(e) {
+      var selectRoom = [];
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
+          }
+        });
+      });
+      if (selectRoom.length === 0) {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      console.log("selectRoom", selectRoom);
+      this.$refs.ModalLockRoom.add({ roomLockList: selectRoom });
+      this.$refs.ModalLockRoom.title = "锁房";
+      this.$refs.ModalLockRoom.disableSubmit = false;
+    },
+    handleDirty() {
+      var selectRoom = [];
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            selectRoom.push(c.roomInfo.id);
+          }
+        });
+      });
+      if (selectRoom.length === 0) {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      var ids = selectRoom.join(",");
+      postAction("/rooms/cesRooms/dirtyRoom?roomIds=" + ids, {}).then(
+        (res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+          }
+        }
+      );
+    },
+    handleClean(e) {
+      var selectRoom = [];
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
+          }
+        });
+      });
+      if (selectRoom.length === 0) {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      console.log("selectRoom", selectRoom);
+      this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom });
+      this.$refs.ModalCleanRoom.title = "清理房间";
+      this.$refs.ModalCleanRoom.disableSubmit = false;
+    },
+    handleOffLock() {
+      var selectRoom = [];
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            selectRoom.push(c.roomInfo.id);
+          }
+        });
+      });
+      if (selectRoom.length === 0) {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      var ids = selectRoom.join(",");
+      postAction("/fw/fwRoomLock/offLockRoom?roomIds=" + ids, {}).then(
+        (res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+          }
+        }
+      );
+    },
+    handleCompleteRepair() {
+      var selectRoom = [];
+      this.roomList.forEach((t) => {
+        t.rooms.forEach((c) => {
+          if (c.roomInfo.state === 88) {
+            selectRoom.push(c.roomInfo.id);
+          }
+        });
+      });
+      if (selectRoom.length === 0) {
+        this.$message.warning("请先选择房间");
+        return;
+      }
+      var ids = selectRoom.join(",");
+      postAction("/fw/fwRoomRepair/completeRepairRoom?roomIds=" + ids, {}).then(
+        (res) => {
+          if (res.success) {
+            this.$message.success(res.message);
+            this.loadData();
+          }
+        }
+      );
+    },
+    modalLockRoomFormOk() {
+      this.loadData();
+    },
     onMenuClick(e, row) {
       console.log("e", e);
       console.log("row", row);

+ 153 - 0
src/views/room/modules/clean/CleanRoomForm.vue

@@ -0,0 +1,153 @@
+<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="waiterId"
+            >
+              <a-select placeholder="服务员" v-model="model.waiterId">
+                <a-select-option
+                  :value="item.id"
+                  v-for="(item, index) in busWaiterList"
+                  :key="item.id"
+                >
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item
+              label="备注"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="请输入备注"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMeetingRoomForm",
+  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: {
+        waiterId: [{ required: true, message: "请选择服务员!" }],
+      },
+      url: {
+        add: "/fw/fwRoomClean/add",
+        edit: "/fw/fwRoomClean/edit",
+        queryById: "/fw/fwRoomClean/queryById",
+      },
+      busWaiterList:[]
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    getAction("/business/busWaiter/list", {
+      hotelId: _info.id,
+      pageNo: 1,
+      pageSize: 99999,
+    }).then((res) => {
+      if (res.success) {
+        this.busWaiterList = res.result.records;
+      }
+    });
+  },
+  methods: {
+    onChange(date, dateString) {
+      console.log(date, dateString);
+    },
+    add(record) {
+      this.modelDefault = Object.assign(this.modelDefault, record);
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/clean/CleanRoomModal.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="关闭">
+    <upkeep-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></upkeep-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import UpkeepRoomForm from './CleanRoomForm'
+  export default {
+    name: 'UpkeepRoomFormModal',
+    components: {
+      UpkeepRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 125 - 0
src/views/room/modules/lock/LockRoomForm.vue

@@ -0,0 +1,125 @@
+<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="remark"
+            >
+              <a-textarea
+                v-model="model.remark"
+                rows="4"
+                placeholder="请输入锁房原因"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from "@/api/manage";
+import { validateDuplicateValue } from "@/utils/util";
+
+export default {
+  name: "BusMeetingRoomForm",
+  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: {
+        remark: [{ required: true, message: "请输入锁房原因!" }],
+      },
+      url: {
+        add: "/fw/fwRoomLock/add",
+        edit: "/fw/fwRoomLock/edit",
+        queryById: "/fw/fwRoomLock/queryById",
+      },
+    };
+  },
+  computed: {
+    formDisabled() {
+      return this.disabled;
+    },
+  },
+  created() {
+    var _info = JSON.parse(localStorage.getItem("storeInfo"));
+    if (_info) {
+      this.model.hotelId = _info.id;
+    }
+    //备份model原始值
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    onChange(date, dateString) {
+      console.log(date, dateString);
+    },
+    add(record) {
+      this.modelDefault = Object.assign(this.modelDefault, record);
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    submitForm() {
+      const that = this;
+      // 触发表单验证
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = "";
+          let method = "";
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = "post";
+          } else {
+            httpurl += this.url.edit;
+            method = "put";
+          }
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.$emit("ok");
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+            });
+        }
+      });
+    },
+  },
+};
+</script>

+ 60 - 0
src/views/room/modules/lock/LockRoomModal.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="关闭">
+    <upkeep-room-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></upkeep-room-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import UpkeepRoomForm from './LockRoomForm'
+  export default {
+    name: 'UpkeepRoomFormModal',
+    components: {
+      UpkeepRoomForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add(record);
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>

+ 21 - 10
src/views/room/modules/upkeep/UpkeepRoomForm.vue

@@ -41,7 +41,13 @@
 <script>
 import { httpAction, getAction } from "@/api/manage";
 import { validateDuplicateValue } from "@/utils/util";
-
+import moment from "moment";
+const date = new Date();
+const endDate = new Date(date.setDate(date.getDate() + 1));
+const dateRange = [
+  moment(new Date(), "YYYY-MM-DD"),
+  moment(endDate, "YYYY-MM-DD"),
+];
 export default {
   name: "BusMeetingRoomForm",
   components: {},
@@ -55,7 +61,11 @@ export default {
   },
   data() {
     return {
-      model: {},
+      model: {
+        dateRange: dateRange,
+        startDate: moment(dateRange[0]).format("YYYY-MM-DD"),
+        endDate: moment(dateRange[1]).format("YYYY-MM-DD"),
+      },
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 },
@@ -70,9 +80,9 @@ export default {
         remark: [{ required: true, message: "请输入维修原因!" }],
       },
       url: {
-        add: "/business/busMeetingRoom/add",
-        edit: "/business/busMeetingRoom/edit",
-        queryById: "/business/busMeetingRoom/queryById",
+        add: "/fw/fwRoomRepair/add",
+        edit: "/fw/fwRoomRepair/edit",
+        queryById: "/fw/fwRoomRepair/queryById",
       },
     };
   },
@@ -90,10 +100,13 @@ export default {
     this.modelDefault = JSON.parse(JSON.stringify(this.model));
   },
   methods: {
-    onChange(date, dateString) {
-      console.log(date, dateString);
+    moment,
+    onChange(e, dateString) {
+      this.model.startDate = dateString[0];
+      this.model.endDate = dateString[1];
     },
-    add() {
+    add(record) {
+      this.modelDefault = Object.assign(this.modelDefault, record);
       this.edit(this.modelDefault);
     },
     edit(record) {
@@ -102,8 +115,6 @@ export default {
     },
     submitForm() {
       const that = this;
-      that.$message.warning('未实现');
-      return;
       // 触发表单验证
       this.$refs.form.validate((valid) => {
         if (valid) {

+ 2 - 2
src/views/room/modules/upkeep/UpkeepRoomModal.vue

@@ -29,10 +29,10 @@
       }
     },
     methods: {
-      add () {
+      add (record) {
         this.visible=true
         this.$nextTick(()=>{
-          this.$refs.realForm.add();
+          this.$refs.realForm.add(record);
         })
       },
       edit (record) {