<template>
<a-card :bordered="false">
            <!-- 查询区域 -->
            <div class="table-page-search-wrapper">
                <a-form layout="inline" @keyup.enter.native="searchQuery">
                    <a-row :gutter="24">
                        <a-col :span="3">
                            <a-form-item label="">
                                <a-input placeholder="房号" v-model="queryParam.roomName"></a-input>
                            </a-form-item>
                        </a-col>
                        <a-col :span="3">
                            <a-form-item label="">
                                <a-select v-model="queryParam.state" style="width: 100%" placeholder="请选择" allowClear>
                                    <a-select-option :value="4">取消查房</a-select-option>
                                    <a-select-option :value="0">待查房</a-select-option>
                                    <a-select-option :value="1">等待查房</a-select-option>
                                    <a-select-option :value="2">正在查房</a-select-option>
                                    <a-select-option :value="3">查房完毕</a-select-option>
                                </a-select>
                            </a-form-item>
                        </a-col>
                        <a-col :span="6">
                                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                                <a-button :disabled="selectionRows.length==0" type="danger" style="margin-left:20px;" @click="batchDel" icon="search">批量删除</a-button>
                        </a-col>
                    </a-row>
                </a-form>
            </div>
            <!-- 查询区域-END -->
            <!-- table区域-begin -->
            <div>
                <!-- type:'radio' -->
                <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">
                </a-table>
            </div>
</a-card>
</template>

<script>
import "@/assets/less/TableExpand.less";
import {
    mixinDevice
} from "@/utils/mixin";
import {
    JeecgListMixin
} from "@/mixins/JeecgListMixin";
// import BillRoomInfoModal from "./modules/checkIn/BillRoomInfoModal.vue";
import {
    httpAction,
    postAction,
    getAction
} from "@/api/manage";
export default {
    name: "CesOrderMessageList",
    mixins: [JeecgListMixin, mixinDevice],
    components: {
        // BillRoomInfoModal,
    },
    data() {
        return {
            // 表头
            columns: [{
                    title: "查房状态",
                    align: "center",
                    dataIndex: 'state',
                    customRender: function (text) {
                        let txt = "";
                        switch (text) {
                            case 0:
                                txt = "待查房";
                                break;
                            case 1:
                                txt = "等待查房";
                                break;
                            case 2:
                                txt = "正在查房";
                                break;
                            case 3:
                                txt = "查房完毕";
                                break;
                            case 4:
                                txt = "取消查房";
                                break;
                            default:
                                break;
                        }
                        return txt;
                    },
                },
                {
                    title: "房号",
                    align: "center",
                    dataIndex: "roomName",
                },
                {
                    title: "客人姓名",
                    align: "center",
                    dataIndex: "contactName",
                },
                {
                    title: "查房发起人",
                    align: "center",
                    dataIndex: "promoterBy",
                },
                {
                    title: "查房发起时间",
                    align: "center",
                    dataIndex: "promoterTime",
                },
                {
                    title: "查房备注",
                    align: "center",
                    dataIndex: "remark",
                },
                {
                    title: "查房人",
                    align: "center",
                    dataIndex: "cfWaiterName",
                },
                {
                    title: "查房时间",
                    align: "center",
                    dataIndex: "cfTime",
                },
                {
                    title: "查房反馈",
                    align: "center",
                    dataIndex: "feedback",
                },
                {
                    title: "查房完成人",
                    align: "center",
                    dataIndex: "completedBy",
                },
                {
                    title: "查房完成时间",
                    align: "center",
                    dataIndex: "completedTime",
                },
                {
                    title: "房间状态",
                    align: "center",
                    dataIndex: "roomStatus",
                }
            ],
            url: {
                list: "/fw/fwRoomExamine/list",
                delete: "/fw/fwRoomExamine/delete",
                deleteBatch: "/fw/fwRoomExamine/deleteBatch",
            },
            queryParam: {
                // type: 1,
                // livingStatus: -1,
                // bookingStatus: 1
            },
        };
    },
    created() {
        getAction("/business/busWaiter/list", {
            // hotelId: _info.id,
            pageNo: 1,
            pageSize: 99999,
        }).then((res) => {
            if (res.success) {
                this.busWaiterList = res.result.records;
            }
        });
    },
    computed: {
        
    },
    methods: {

    },
};
</script>

<style scoped>
@import "~@assets/less/common.less";
</style>
