|
|
@@ -4,51 +4,86 @@
|
|
|
<el-col :span="24">
|
|
|
<div class="cell">
|
|
|
<div class="cell-title">
|
|
|
- <div class="title-left" :class="{ 'tab_qiehuan_bg' : tab_qiehuan == true}" @click="order_click()">
|
|
|
+ <div class="title-left" :class="{ 'tab_qiehuan_bg' : tab_qiehuan == 1}" @click="order_click()">
|
|
|
<div class="title">订单管理</div>
|
|
|
</div>
|
|
|
- <div class="title-left" :class="{ 'tab_qiehuan_bg' : tab_qiehuan == false}" @click="tongji_click()">
|
|
|
- <div class="title">统计</div>
|
|
|
+ <div class="title-left" :class="{ 'tab_qiehuan_bg' : tab_qiehuan == 2}" @click="tongji_click()">
|
|
|
+ <div class="title">预订统计</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="tab_qiehuan" class="cell-body">
|
|
|
+ <div v-if="tab_qiehuan == 1" class="cell-body">
|
|
|
<div class="controls">
|
|
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
- <el-form-item label="">
|
|
|
- <el-input v-model="formInline.order_name_phone" prefix-icon="el-icon-search" clearable placeholder="请输入关键字"></el-input>
|
|
|
+ <el-form-item label="关键字">
|
|
|
+ <el-input v-model="formInline.key" prefix-icon="el-icon-search" clearable placeholder="请输入关键字"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" class="btn-search" @click="btn_search">查询</el-button>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="支付时间:">
|
|
|
- <el-date-picker v-model="search_datatime" type="datetimerange" align="right" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
- @change="search_datetime_change" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- format="yyyy-MM-dd HH:mm:ss" clearable>
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="">
|
|
|
- <el-select v-model="formInline.status" placeholder="支付状态" @change="search_state_change">
|
|
|
+ <el-form-item label="状态">
|
|
|
+ <el-select v-model="formInline.status" placeholder="状态" @change="search_state_change">
|
|
|
<el-option label="全部" value=""></el-option>
|
|
|
<el-option label="待支付" value="1"></el-option>
|
|
|
<el-option label="已支付" value="2"></el-option>
|
|
|
<el-option label="已入住" value="3"></el-option>
|
|
|
<el-option label="已取消" value="4"></el-option>
|
|
|
- <el-option label="退款中" value="7"></el-option>
|
|
|
<el-option label="已退款" value="5"></el-option>
|
|
|
<el-option label="已退房" value="6"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item :label="lbl_time_txt" v-show="showDatatime">
|
|
|
- <el-date-picker v-model="bind_datatime" type="datetimerange" align="right" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
- @change="bind_datetime_change" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
- format="yyyy-MM-dd HH:mm:ss" clearable>
|
|
|
+ <el-form-item label="房型">
|
|
|
+ <el-select v-model="formInline.h_type" placeholder="" @change="search_state_change">
|
|
|
+ <el-option label="全部" value=""></el-option>
|
|
|
+ <el-option label="标准型" value="标准型"></el-option>
|
|
|
+ <el-option label="高级型" value="高级型"></el-option>
|
|
|
+ <el-option label="豪华型" value="豪华型"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入住日期">
|
|
|
+ <el-date-picker v-model="formInline.live_time" type="date" align="right" placeholder="入住日期" @change="search_datetime_change"
|
|
|
+ value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="离店日期">
|
|
|
+ <el-date-picker v-model="formInline.end_time" type="date" align="right" placeholder="离店日期" @change="search_datetime_change"
|
|
|
+ value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付日期" v-show="formInline.pay_date_show_in_search">
|
|
|
+ <el-date-picker v-model="formInline.pay_time" type="date" align="right" placeholder="支付日期" @change="search_datetime_change"
|
|
|
+ value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="核销日期" v-show="formInline.cancel_verification_date_show_in_search">
|
|
|
+ <el-date-picker v-model="formInline.hx_time" type="date" align="right" placeholder="核销日期" @change="search_datetime_change"
|
|
|
+ value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="取消日期" v-show="formInline.cancel_date_show_in_search">
|
|
|
+ <el-date-picker v-model="formInline.cancel_time" type="date" align="right" placeholder="取消日期"
|
|
|
+ @change="search_datetime_change" value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="退款日期" v-show="formInline.refund_date_show_in_search">
|
|
|
+ <el-date-picker v-model="formInline.refund_time" type="date" align="right" placeholder="退款日期"
|
|
|
+ @change="search_datetime_change" value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="退房日期" v-show="formInline.check_out_date_show_in_search">
|
|
|
+ <el-date-picker v-model="formInline.tf_time" type="date" align="right" placeholder="退房日期" @change="search_datetime_change"
|
|
|
+ value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建日期" v-show="formInline.create_date_show_in_search">
|
|
|
+ <el-date-picker v-model="formInline.create_time" type="date" align="right" placeholder="创建日期"
|
|
|
+ @change="search_datetime_change" value-format="yyyy-MM-dd" format="yyyy-MM-dd" clearable>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-button type="primary" class="export" @click="handler_download_excel">导出订单</el-button>
|
|
|
</div>
|
|
|
- <el-table :data="tableData" height="538" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
- :header-cell-style="header_cell_style" border>
|
|
|
+ <el-table ref="tablefixed" :data="tableData" height="538" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
+ :header-cell-style="header_cell_style" border stripe>
|
|
|
<el-table-column label="订单号" fixed align="center" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.order_num }}</span>
|
|
|
@@ -63,7 +98,6 @@
|
|
|
<span v-else-if="scope.row.status === '5'" class="txt-cell-red">已退款</span>
|
|
|
<span v-else-if="scope.row.status === '6'" class="txt-cell-red">已退房</span>
|
|
|
<span v-else-if="scope.row.status === '7'" class="txt-cell-red">退款中</span>
|
|
|
- <span v-else class="txt-cell-red">未知</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="预订人" fixed align="center" width="100">
|
|
|
@@ -71,7 +105,12 @@
|
|
|
<span>{{ scope.row.user_name }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="手机号" fixed align="center" width="150">
|
|
|
+ <el-table-column label="手机号" fixed align="center" v-if="formInline.status === '1'">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.phone }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="手机号" fixed align="center" v-else width="150">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.phone }}</span>
|
|
|
</template>
|
|
|
@@ -96,32 +135,37 @@
|
|
|
<span>{{ scope.row.pay_account.toFixed(2) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="支付时间" align="center" width="158">
|
|
|
+ <el-table-column label="支付时间" align="center" width="158" v-if="formInline.pay_date_show_col">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.create_time }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="核销时间" align="center" width="158">
|
|
|
+ <el-table-column label="核销时间" align="center" width="158" v-if="formInline.cancel_verification_date_show_col">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.hx_time }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="取消时间" align="center" width="158">
|
|
|
+ <el-table-column label="取消时间" align="center" width="158" v-if="formInline.cancel_date_show_col">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.cancel_time }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="退款时间" align="center" width="158">
|
|
|
+ <el-table-column label="退款时间" align="center" width="158" v-if="formInline.refund_date_show_col">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.refund_time }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="退房时间" align="center" width="158">
|
|
|
+ <el-table-column label="退房时间" align="center" width="158" v-if="formInline.check_out_date_show_col">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.tf_time }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" fixed="right" align="center" width="220">
|
|
|
+ <el-table-column label="创建时间" align="center" width="158" v-if="formInline.create_date_show_col">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.create_time }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" fixed="right" align="center" width="220" v-if="formInline.action_show_col">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" round type="primary" @click="collate_handler(scope.$index, scope.row)">核销</el-button>
|
|
|
<el-button size="mini" round type="danger" @click="refund_handler(scope.$index, scope.row)">退款</el-button>
|
|
|
@@ -137,10 +181,17 @@
|
|
|
</div>
|
|
|
<div v-else class="cell-body">
|
|
|
<div class="controls">
|
|
|
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
- <el-form-item label="">
|
|
|
- <el-date-picker v-model="formInline_tongji.date" :editable="false" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期"
|
|
|
- :picker-options="pickerOptions">
|
|
|
+ <el-form :inline="true" :model="formInline_tongji" class="demo-form-inline">
|
|
|
+ <el-form-item label="房型">
|
|
|
+ <el-select v-model="formInline_tongji.h_type" placeholder="">
|
|
|
+ <el-option label="全部" value=""></el-option>
|
|
|
+ <el-option label="标准型" value="标准型"></el-option>
|
|
|
+ <el-option label="高级型" value="高级型"></el-option>
|
|
|
+ <el-option label="豪华型" value="豪华型"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入住日期">
|
|
|
+ <el-date-picker v-model="formInline_tongji.date" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
@@ -148,9 +199,9 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
- <el-table :data="tableData_tongji" height="525" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
- :header-cell-style="header_cell_style">
|
|
|
- <el-table-column label="日期" align="center">
|
|
|
+ <el-table :data="tableData_tongji" height="525" style="width: 100%" :cell-style="cell_style" v-loading="loading_list"
|
|
|
+ :header-cell-style="header_cell_style" border stripe>
|
|
|
+ <el-table-column label="入住日期" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.date }}</span>
|
|
|
</template>
|
|
|
@@ -162,7 +213,30 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="预定数量" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.y_num }}</span>
|
|
|
+ <span>
|
|
|
+ <div class="create-link" @click="view_data('2', scope.row.h_type)">{{ scope.row.y_num }}</div>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="新增数量" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ <div>{{ scope.row.a_num }}</div>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="退款数量" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ <div class="create-link" @click="view_data('5', scope.row.h_type)">{{ scope.row.t_num }}</div>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="取消数量" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>
|
|
|
+ <div class="create-link" @click="view_data('4', scope.row.h_type)">{{ scope.row.c_num }}</div>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="剩余数量" align="center">
|
|
|
@@ -176,11 +250,6 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <!-- <div class="pagination-table">
|
|
|
- <el-pagination @current-change="currentPageTongjiChange" :current-page.sync="pagination_tongji.currentPage"
|
|
|
- :page-size="pagination_tongji.pageSize" layout="prev, pager, next, jumper" :total="pagination_tongji.total">
|
|
|
- </el-pagination>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
@@ -243,30 +312,38 @@
|
|
|
'font-size': '16px',
|
|
|
'font-family': 'Microsoft YaHei-3970(82674968)'
|
|
|
},
|
|
|
- search_datatime: '', // 支付时间
|
|
|
- bind_datatime: '', // 绑定时间
|
|
|
- refund_datatime: '', // 退款时间
|
|
|
- hx_datatime: '', // 核销时间
|
|
|
- tf_datatime: '', // 退房时间
|
|
|
- lbl_time_txt: '', // 筛选时间文本
|
|
|
- showDatatime: false, // 显示和隐藏时间选择
|
|
|
// 表单数据
|
|
|
formInline: {
|
|
|
- order_name_phone: '',
|
|
|
- start_time: '',
|
|
|
- end_time: '',
|
|
|
- refund_start_time: '',
|
|
|
- refund_end_time: '',
|
|
|
- hx_start_time: '',
|
|
|
- hx_end_time: '',
|
|
|
- cancel_start_time: '',
|
|
|
- cancel_end_time: '',
|
|
|
- tf_start_time: '',
|
|
|
- tf_end_time: '',
|
|
|
- status: ''
|
|
|
+ live_time: '', // 入住日期
|
|
|
+ end_time: '', // 离店日期
|
|
|
+ pay_time: '', // 支付日期
|
|
|
+ hx_time: '', // 核销日期
|
|
|
+ cancel_time: '', // 取消日期
|
|
|
+ refund_time: '', // 退款日期
|
|
|
+ tf_time: '', // 退房日期
|
|
|
+ create_time: '', // 创建日期
|
|
|
+ // 查询选项是否显示
|
|
|
+ pay_date_show_in_search: true, // 显示支付日期查询选项
|
|
|
+ cancel_verification_date_show_in_search: true, // 显示核销日期查询选项
|
|
|
+ cancel_date_show_in_search: true, // 显示取消日期查询选项
|
|
|
+ refund_date_show_in_search: true, // 显示退款日期查询选项
|
|
|
+ check_out_date_show_in_search: true, // 显示退房日期查询选项
|
|
|
+ create_date_show_in_search: true, // 显示创建日期查询选项
|
|
|
+ // 数据表是否显示相应的列
|
|
|
+ pay_date_show_col: true, // 显示支付日期数据列
|
|
|
+ cancel_verification_date_show_col: true, // 显示核销日期数据列
|
|
|
+ cancel_date_show_col: true, // 显示取消日期数据列
|
|
|
+ refund_date_show_col: true, // 显示退款日期数据列
|
|
|
+ check_out_date_show_col: true, // 显示退房日期数据列
|
|
|
+ create_date_show_col: true, // 显示创建日期数据列
|
|
|
+ action_show_col: true, // 显示操作按钮列
|
|
|
+ key: '', // 姓名/手机号 关键字
|
|
|
+ status: '', // 状态
|
|
|
+ h_type: '' // 房型
|
|
|
},
|
|
|
formInline_tongji: {
|
|
|
- date: ''
|
|
|
+ date: '',
|
|
|
+ h_type: ''
|
|
|
},
|
|
|
tableData: [],
|
|
|
tableData_tongji: [],
|
|
|
@@ -284,26 +361,41 @@
|
|
|
total: 0
|
|
|
},
|
|
|
loading: true,
|
|
|
- tab_qiehuan: true
|
|
|
+ loading_list: true,
|
|
|
+ tab_qiehuan: 1,
|
|
|
+ interval: ''
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ let d = getDateComponents(new Date(), 'yyyy-mm-dd').date
|
|
|
+ this.formInline.live_time = d
|
|
|
// 获取消费记录,表格数据
|
|
|
- this.get_table_data('list')
|
|
|
+ this.get_table_data('list');
|
|
|
// 获取消费记录,表格数据
|
|
|
- this.get_tongji_data('list')
|
|
|
+ this.startRepeatingInterval();
|
|
|
},
|
|
|
mounted() {
|
|
|
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
|
|
|
},
|
|
|
+ beforeunload() {
|
|
|
+ this.clearRepeatingInterval(this.timer);
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ // 点击跳转查看对应数据
|
|
|
+ view_data(param, hType) {
|
|
|
+ this.tab_qiehuan = 1;
|
|
|
+ this.formInline.status = param;
|
|
|
+ this.formInline.h_type = hType;
|
|
|
+ this.search_state_change();
|
|
|
+ this.get_tongji_data('search');
|
|
|
+ },
|
|
|
// 统计标签
|
|
|
tongji_click() {
|
|
|
- this.tab_qiehuan = false;
|
|
|
+ this.tab_qiehuan = 2;
|
|
|
},
|
|
|
// 订单标签
|
|
|
order_click() {
|
|
|
- this.tab_qiehuan = true;
|
|
|
+ this.tab_qiehuan = 1;
|
|
|
},
|
|
|
/**
|
|
|
* 核销
|
|
|
@@ -453,91 +545,106 @@
|
|
|
* 选取的支付时间进行格式化,赋值给formInline
|
|
|
*/
|
|
|
search_datetime_change() {
|
|
|
- // console.log(this.search_datatime);
|
|
|
- if (this.search_datatime == null) {
|
|
|
- this.formInline.start_time = ''
|
|
|
- this.formInline.end_time = ''
|
|
|
- } else {
|
|
|
- this.formInline.start_time = this.search_datatime[0]
|
|
|
- this.formInline.end_time = this.search_datatime[1]
|
|
|
- }
|
|
|
// 刷新列表
|
|
|
this.get_table_data('search')
|
|
|
},
|
|
|
/**
|
|
|
- * 绑定时间转化成其他时间,进行格式化,赋值给formInline
|
|
|
- * bind_datetime
|
|
|
+ * 搜索状态
|
|
|
*/
|
|
|
- bind_datetime_change() {
|
|
|
- if (this.formInline.status == 5) {
|
|
|
- // this.lbl_time_txt = '退款时间:';
|
|
|
- this.formInline.refund_start_time = this.bind_datatime[0]
|
|
|
- this.formInline.refund_end_time = this.bind_datatime[1]
|
|
|
- } else if (this.formInline.status == 4) {
|
|
|
- // this.lbl_time_txt = '取消时间:';
|
|
|
- this.formInline.cancel_start_time = this.bind_datatime[0]
|
|
|
- this.formInline.cancel_end_time = this.bind_datatime[1]
|
|
|
- } else if (this.formInline.status == 3) {
|
|
|
- // this.lbl_time_txt = '核销时间:';
|
|
|
- this.formInline.hx_start_time = this.bind_datatime[0]
|
|
|
- this.formInline.hx_end_time = this.bind_datatime[1]
|
|
|
- } else if (this.formInline.status == 6) {
|
|
|
- // this.lbl_time_txt = '退房时间:';
|
|
|
- this.formInline.tf_start_time = this.bind_datatime[0]
|
|
|
- this.formInline.tf_end_time = this.bind_datatime[1]
|
|
|
- } else {
|
|
|
- this.formInline.refund_start_time = undefined
|
|
|
- this.formInline.refund_end_time = undefined
|
|
|
+ search_state_change() {
|
|
|
+ // 查询选项是否显示
|
|
|
+ this.formInline.pay_date_show_in_search = false; // 显示支付日期查询选项
|
|
|
+ this.formInline.cancel_verification_date_show_in_search = false; // 显示核销日期查询选项
|
|
|
+ this.formInline.cancel_date_show_in_search = false; // 显示取消日期查询选项
|
|
|
+ this.formInline.refund_date_show_in_search = false; // 显示退款日期查询选项
|
|
|
+ this.formInline.check_out_date_show_in_search = false; // 显示退房日期查询选项
|
|
|
+ this.formInline.create_date_show_in_search = false; // 显示创建日期查询选项
|
|
|
+ // 数据表是否显示相应的列
|
|
|
+ this.formInline.pay_date_show_col = false; // 显示支付日期数据列
|
|
|
+ this.formInline.cancel_verification_date_show_col = false; // 显示核销日期数据列
|
|
|
+ this.formInline.cancel_date_show_col = false; // 显示取消日期数据列
|
|
|
+ this.formInline.refund_date_show_col = false; // 显示退款日期数据列
|
|
|
+ this.formInline.check_out_date_show_col = false; // 显示退房日期数据列
|
|
|
+ this.formInline.create_date_show_col = false; // 显示创建日期数据列
|
|
|
+ this.formInline.action_show_col = false; // 显示操作按钮列
|
|
|
|
|
|
- this.formInline.cancel_start_time = undefined
|
|
|
- this.formInline.cancel_end_time = undefined
|
|
|
+ if (this.formInline.status == 1) {
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
|
|
|
- this.formInline.hx_start_time = undefined
|
|
|
- this.formInline.hx_end_time = undefined
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.action_show_col = false; // 显示操作按钮列
|
|
|
|
|
|
- this.formInline.tf_start_time = undefined
|
|
|
- this.formInline.tf_end_time = undefined
|
|
|
- }
|
|
|
+ } else if (this.formInline.status == 2) {
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
+ this.formInline.pay_date_show_in_search = true; // 显示支付日期查询选项
|
|
|
+
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.pay_date_show_col = true; // 显示支付日期数据列
|
|
|
+ this.formInline.action_show_col = true; // 显示操作按钮列
|
|
|
|
|
|
- // 刷新列表
|
|
|
- this.get_table_data('search')
|
|
|
- },
|
|
|
- /**
|
|
|
- * 搜索状态
|
|
|
- */
|
|
|
- search_state_change() {
|
|
|
- if (this.formInline.status == 5) {
|
|
|
- this.change_value('退款时间:');
|
|
|
- } else if (this.formInline.status == 4) {
|
|
|
- this.change_value('取消时间:');
|
|
|
} else if (this.formInline.status == 3) {
|
|
|
- this.change_value('核销时间:');
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
+ this.formInline.pay_date_show_in_search = true; // 显示支付日期查询选项
|
|
|
+ this.formInline.cancel_verification_date_show_in_search = true; // 显示核销日期查询选项
|
|
|
+
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.pay_date_show_col = true; // 显示支付日期数据列
|
|
|
+ this.formInline.cancel_verification_date_show_col = true; // 显示核销日期数据列
|
|
|
+ this.formInline.action_show_col = true; // 显示操作按钮列
|
|
|
+
|
|
|
+ } else if (this.formInline.status == 4) {
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
+ this.formInline.pay_date_show_in_search = true; // 显示支付日期查询选项
|
|
|
+ this.formInline.cancel_date_show_in_search = true; // 显示核销日期查询选项
|
|
|
+
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.pay_date_show_col = true; // 显示支付日期数据列
|
|
|
+ this.formInline.cancel_date_show_col = true; // 显示取消日期数据列
|
|
|
+ this.formInline.action_show_col = true; // 显示操作按钮列
|
|
|
+
|
|
|
+ } else if (this.formInline.status == 5) {
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
+ this.formInline.pay_date_show_in_search = true; // 显示支付日期查询选项
|
|
|
+ this.formInline.refund_date_show_in_search = true; // 显示退款日期查询选项
|
|
|
+
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.pay_date_show_col = true; // 显示支付日期数据列
|
|
|
+ this.formInline.refund_date_show_col = true; // 显示退款日期数据列
|
|
|
+ this.formInline.action_show_col = true; // 显示操作按钮列
|
|
|
+
|
|
|
} else if (this.formInline.status == 6) {
|
|
|
- this.change_value('退房时间:');
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
+ this.formInline.pay_date_show_in_search = true; // 显示支付日期查询选项
|
|
|
+ this.formInline.check_out_date_show_in_search = true; // 显示退房日期查询选项
|
|
|
+
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.pay_date_show_col = true; // 显示支付日期数据列
|
|
|
+ this.formInline.check_out_date_show_col = true; // 显示退房日期数据列
|
|
|
+ this.formInline.action_show_col = true; // 显示操作按钮列
|
|
|
+
|
|
|
} else {
|
|
|
- this.lbl_time_txt = '';
|
|
|
- this.bind_datatime = '';
|
|
|
- this.showDatatime = false;
|
|
|
+ this.formInline.pay_date_show_in_search = true; // 显示支付日期查询选项
|
|
|
+ this.formInline.cancel_verification_date_show_in_search = true; // 显示核销日期查询选项
|
|
|
+ this.formInline.cancel_date_show_in_search = true; // 显示取消日期查询选项
|
|
|
+ this.formInline.refund_date_show_in_search = true; // 显示退款日期查询选项
|
|
|
+ this.formInline.check_out_date_show_in_search = true; // 显示退房日期查询选项
|
|
|
+ this.formInline.create_date_show_in_search = true; // 显示创建日期查询选项
|
|
|
+ // 数据表是否显示相应的列
|
|
|
+ this.formInline.pay_date_show_col = true; // 显示支付日期数据列
|
|
|
+ this.formInline.cancel_verification_date_show_col = true; // 显示核销日期数据列
|
|
|
+ this.formInline.cancel_date_show_col = true; // 显示取消日期数据列
|
|
|
+ this.formInline.refund_date_show_col = true; // 显示退款日期数据列
|
|
|
+ this.formInline.check_out_date_show_col = true; // 显示退房日期数据列
|
|
|
+ this.formInline.create_date_show_col = true; // 显示创建日期数据列
|
|
|
+ this.formInline.action_show_col = true; // 显示操作按钮列
|
|
|
}
|
|
|
+
|
|
|
// 刷新列表
|
|
|
- this.get_table_data('search')
|
|
|
- },
|
|
|
- change_value(param) {
|
|
|
- this.lbl_time_txt = param;
|
|
|
- this.bind_datatime = '';
|
|
|
- this.formInline.refund_start_time = ''
|
|
|
- this.formInline.refund_end_time = ''
|
|
|
- this.formInline.cancel_start_time = ''
|
|
|
- this.formInline.cancel_end_time = ''
|
|
|
- this.formInline.hx_start_time = ''
|
|
|
- this.formInline.hx_end_time = ''
|
|
|
- this.formInline.tf_start_time = ''
|
|
|
- this.formInline.tf_end_time = ''
|
|
|
- this.showDatatime = true;
|
|
|
+ this.get_table_data('search');
|
|
|
},
|
|
|
// 统计表格数据
|
|
|
get_tongji_data(param) {
|
|
|
- this.loading = true
|
|
|
+ this.loading_list = true
|
|
|
|
|
|
this.get_tongji_condtion();
|
|
|
|
|
|
@@ -563,7 +670,17 @@
|
|
|
// console.log(err);
|
|
|
this.$message.error(err.message)
|
|
|
});
|
|
|
- this.loading = false;
|
|
|
+ this.loading_list = false;
|
|
|
+ },
|
|
|
+ startRepeatingInterval() {
|
|
|
+ this.interval = setInterval(() => {
|
|
|
+ this.get_tongji_data('list')
|
|
|
+ }, 3000); // 1000 毫秒后执行 myFunction
|
|
|
+ },
|
|
|
+ clearRepeatingInterval() {
|
|
|
+ if (this.interval) {
|
|
|
+ clearInterval(this.interval);
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 获取消费记录,表格数据
|
|
|
@@ -590,6 +707,7 @@
|
|
|
this.tableData = []
|
|
|
this.$message.warning('没有符合条件的数据!')
|
|
|
}
|
|
|
+ this.$refs.tablefixed.doLayout();
|
|
|
}).catch((err) => {
|
|
|
// console.log(err);
|
|
|
this.$message.error(err.message)
|
|
|
@@ -601,12 +719,16 @@
|
|
|
page: this.pagination_tongji.currentPage,
|
|
|
rows: this.pagination_tongji.pageSize
|
|
|
}
|
|
|
+
|
|
|
if (this.formInline_tongji.date !== '' && this.formInline_tongji.date !== null) {
|
|
|
data.date = this.formInline_tongji.date
|
|
|
} else {
|
|
|
let d = getDateComponents(new Date(), 'yyyy-mm-dd').date
|
|
|
- data.date = d
|
|
|
- this.formInline_tongji.date = d
|
|
|
+ this.formInline_tongji.date = data.date
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.formInline_tongji.h_type !== '') {
|
|
|
+ data.h_type = this.formInline_tongji.h_type
|
|
|
}
|
|
|
|
|
|
this.cond_tongji_data = data;
|
|
|
@@ -619,38 +741,35 @@
|
|
|
page: this.pagination.currentPage,
|
|
|
rows: this.pagination.pageSize
|
|
|
}
|
|
|
- if (this.formInline.order_name_phone !== '') {
|
|
|
- data.order_name_phone = this.formInline.order_name_phone
|
|
|
+ if (this.formInline.key !== '') {
|
|
|
+ data.key = this.formInline.key
|
|
|
}
|
|
|
- if (this.formInline.start_time !== '') {
|
|
|
- data.start_time = this.formInline.start_time
|
|
|
+ if (this.formInline.h_type !== '') {
|
|
|
+ data.h_type = this.formInline.h_type
|
|
|
}
|
|
|
- if (this.formInline.end_time !== '') {
|
|
|
- data.end_time = this.formInline.end_time
|
|
|
+ if (this.formInline.live_time !== '' && this.formInline.live_time !== null) {
|
|
|
+ data.live_time = this.formInline.live_time
|
|
|
}
|
|
|
- if (this.formInline.refund_start_time !== '') {
|
|
|
- data.refund_start_time = this.formInline.refund_start_time
|
|
|
- }
|
|
|
- if (this.formInline.refund_end_time !== '') {
|
|
|
- data.refund_end_time = this.formInline.refund_end_time
|
|
|
+ if (this.formInline.end_time !== '' && this.formInline.end_time !== null) {
|
|
|
+ data.end_time = this.formInline.end_time
|
|
|
}
|
|
|
- if (this.formInline.cancel_start_time !== '') {
|
|
|
- data.cancel_start_time = this.formInline.cancel_start_time
|
|
|
+ if (this.formInline.pay_time !== '' && this.formInline.pay_time !== null) {
|
|
|
+ data.pay_time = this.formInline.pay_time
|
|
|
}
|
|
|
- if (this.formInline.cancel_end_time !== '') {
|
|
|
- data.cancel_end_time = this.formInline.cancel_end_time
|
|
|
+ if (this.formInline.hx_time !== '' && this.formInline.hx_time !== null) {
|
|
|
+ data.hx_time = this.formInline.hx_time
|
|
|
}
|
|
|
- if (this.formInline.hx_start_time !== '') {
|
|
|
- data.hx_start_time = this.formInline.hx_start_time
|
|
|
+ if (this.formInline.cancel_time !== '' && this.formInline.cancel_time !== null) {
|
|
|
+ data.cancel_time = this.formInline.cancel_time
|
|
|
}
|
|
|
- if (this.formInline.hx_end_time !== '') {
|
|
|
- data.hx_end_time = this.formInline.hx_end_time
|
|
|
+ if (this.formInline.refund_time !== '' && this.formInline.refund_time !== null) {
|
|
|
+ data.refund_time = this.formInline.refund_time
|
|
|
}
|
|
|
- if (this.formInline.tf_start_time !== '') {
|
|
|
- data.tf_start_time = this.formInline.tf_start_time
|
|
|
+ if (this.formInline.tf_time !== '' && this.formInline.tf_time !== null) {
|
|
|
+ data.tf_time = this.formInline.tf_time
|
|
|
}
|
|
|
- if (this.formInline.tf_end_time !== '') {
|
|
|
- data.tf_end_time = this.formInline.tf_end_time
|
|
|
+ if (this.formInline.create_time !== '' && this.formInline.create_time !== null) {
|
|
|
+ data.create_time = this.formInline.create_time
|
|
|
}
|
|
|
if (this.formInline.status !== '') {
|
|
|
data.status = this.formInline.status
|
|
|
@@ -703,8 +822,8 @@
|
|
|
.cell-title {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- margin-bottom: 30px;
|
|
|
- padding-bottom: 30px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ padding-bottom: 10px;
|
|
|
border-bottom: 1px solid #CCCCCC;
|
|
|
|
|
|
.title-left {
|
|
|
@@ -919,5 +1038,26 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-date-editor.el-input,
|
|
|
+ .el-date-editor.el-input__inner {
|
|
|
+ width: 140px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .create-link {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #0000ff;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .create-link:hover {
|
|
|
+ font-size: 20px;
|
|
|
+ text-decoration: underline;
|
|
|
}
|
|
|
</style>
|