| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379 |
- <template>
- <a-card :bordered="false">
- <a-tabs default-active-key="1">
- <a-tab-pane key="1" tab="待查房">
- <!-- 查询区域 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="searchQuery">
- <a-row :gutter="24">
- <a-col :span="15">
- <a-button @click="cancelRoom" :disabled="setBtnsDisable(4)" type="danger">设置取消查房</a-button>
- <a-button @click="setWaitRoom" :disabled="setBtnsDisable(1)" style="margin-left: 8px">设置等待查房</a-button>
- <a-button @click="setInRoom" :disabled="setBtnsDisable(2)" style="margin-left: 8px">设置正在查房</a-button>
- <a-button @click="setFinishRoom" :disabled="setBtnsDisable(3)" style="margin-left: 8px">设置查房完毕</a-button>
- <a-button type="primary" @click="searchQuery" icon="reload" style="margin-left: 8px">刷新</a-button>
- </a-col>
- <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="3">
- <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
- </span>
- </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">
- <!-- <template slot="name" slot-scope="text, record">
- <a @click="handleBillInfo(record)">{{record.contactName}}</a>
- </template> -->
- </a-table>
- </div>
- </a-tab-pane>
- <a-tab-pane key="2" tab="历史查房">
- <historyLookRoom />
- </a-tab-pane>
- </a-tabs>
- <a-modal :title="title" :visible="visibleLook" @cancel="changeCancel" @ok="submitOK">
- <!-- <j-form-container :disabled="false"> -->
- <a-form-model-item label="服务员" :labelCol="labelCol" :wrapperCol="wrapperCol" v-if="status==2">
- <a-select placeholder="服务员" v-model="waiterId" style="width:40%">
- <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-form-model-item label="请输入备注" :labelCol="labelCol" :wrapperCol="wrapperCol" v-else>
- <a-input v-model="remarks" placeholder="请输入备注"></a-input>
- </a-form-model-item>
- <!-- </j-form-container> -->
- </a-modal>
- </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";
- import historyLookRoom from './historyLookRoom.vue';
- export default {
- name: "CesOrderMessageList",
- mixins: [JeecgListMixin, mixinDevice],
- components: {
- // BillRoomInfoModal,
- historyLookRoom
- },
- data() {
- return {
- title: "",
- busWaiterList: [],
- labelCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 5
- },
- },
- wrapperCol: {
- xs: {
- span: 24
- },
- sm: {
- span: 16
- },
- },
- waiterId: '',
- visibleLook: false,
- status: null,
- // 表头
- 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",
- scopedSlots: { customRender: 'name' }
- },
- {
- 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: "/order/cesOrderMessage/delete",
- deleteBatch: "/order/cesOrderMessage/deleteBatch",
- exportXlsUrl: "/order/cesOrderMessage/exportXls",
- importExcelUrl: "order/cesOrderMessage/importExcel",
- },
- dictOptions: {},
- superFieldList: [],
- hotelList: [],
- queryParam: {
- // type: 1,
- // livingStatus: -1,
- // bookingStatus: 1
- },
- remarks: "",
- };
- },
- created() {
- getAction("/business/busWaiter/list", {
- // hotelId: _info.id,
- pageNo: 1,
- pageSize: 99999,
- }).then((res) => {
- if (res.success) {
- this.busWaiterList = res.result.records;
- }
- });
- },
- computed: {
- importExcelUrl: function () {
- return `${window._CONFIG["domianURL"]}/${this.url.importExcelUrl}`;
- },
- },
- methods: {
- /**
- * 根据选中数据设置按钮是否可用
- */
- setBtnsDisable(type) {
- if (this.selectedRowKeys.length === 0) {
- return true
- }
- if (type == 4 && this.selectionRows.some(item => item.state == 1 || item.state == 2)) {
- return false
- }
- if (type == 1 && this.selectionRows.some(item => item.state == 0 || item.state == 4)) {
- return false
- }
- if (type == 2 && this.selectionRows.some(item => item.state == 1)) {
- return false
- }
- if (type == 3 && this.selectionRows.some(item => item.state == 2)) {
- return false
- }
- return true
- },
- /**
- * 设置取消查房
- */
- cancelRoom() {
- // console.log(this.selectionRows);
- this.status = 4
- this.selectionRows.forEach(item => {
- this.editLookRoom(item, 4)
- })
- // this.editLookRoom(this.selectionRows.livingOrderId, 4)
- },
- changeCancel(){
- this.remarks = ''
- this.waiterId = ''
- this.visibleLook = false
- },
- editLookRoom(data, state, remark = '') {
- // let obj = {
- // id: id,
- // livingOrderId: livingOrderId,
- // state: state,
- // remark: remark,
- // waiterId: this.waiterId,
- // cfTime: this.waiterId?new Date().toLocaleString().replaceAll('/','-'):''
- // }
- data.state = state*1
- if (remark && this.status !=3) {
- data.remark = remark
- }
- if (this.status == 2) {
- data.waiterId = this.waiterId
- data.cfTime = new Date().toLocaleString().replaceAll('/', '-')
- }
- if (this.status == 3) {
- // data.remark = ''
- data.feedback = this.remarks
- }
- console.log(typeof data.state);
- console.log(data);
- // return
- httpAction("/fw/fwRoomExamine/checkRoom", data, 'post').then(res => {
- this.confirmLoading = false;
- if (res.success) {
- this.$message.success("成功");
- this.onClearSelected()
- this.visibleLook = false
- this.loadData()
- } else {
- this.$message.warning(res.message);
- }
- })
- .finally(() => {
- this.remarks = ''
- this.waiterId = ''
- this.confirmLoading = false;
- });
- console.log('3333333333333333333333333333', this.waiterId, this.remarks);
- },
- /**
- * 设置等待查房
- */
- setWaitRoom() {
- this.title = '申请查房'
- this.status = 1
- this.visibleLook = true
- },
- /**
- * 设置正在查房
- */
- setInRoom() {
- this.title = '设置正在查房'
- this.waiterId = ''
- this.status = 2
- this.visibleLook = true
- },
- /**
- * 设置查房完毕
- */
- setFinishRoom() {
- this.title = '查房完毕'
- this.status = 3
- this.visibleLook = true
- },
- /**
- * 表单提交
- */
- submitOK() {
- if (this.status == 2 && !this.waiterId) {
- this.$message.warning('请选择查房人')
- return
- }
- this.confirmLoading = true;
- this.selectionRows.forEach(item => {
- this.editLookRoom(item, this.status, this.remarks)
- })
- },
- handleBillInfo(data){
- console.log(data);
- }
- },
- };
- </script>
- <style scoped>
- @import "~@assets/less/common.less";
- </style>
|