|
|
@@ -10,19 +10,19 @@
|
|
|
</div>
|
|
|
<div class="calc">
|
|
|
<div class="calc-item">
|
|
|
- <div class="calc-item-text">18888888.00</div>
|
|
|
+ <div class="calc-item-text">{{ tongji.orderT }}</div>
|
|
|
<div class="calc-item-desc">订单总额(元)</div>
|
|
|
</div>
|
|
|
<div class="calc-item">
|
|
|
- <div class="calc-item-text">18888.00</div>
|
|
|
+ <div class="calc-item-text">{{ tongji.payT }}</div>
|
|
|
<div class="calc-item-desc">支付总额(元)</div>
|
|
|
</div>
|
|
|
<div class="calc-item">
|
|
|
- <div class="calc-item-text">18888.888</div>
|
|
|
+ <div class="calc-item-text">{{ tongji.refundT }}</div>
|
|
|
<div class="calc-item-desc">退款总额(元)</div>
|
|
|
</div>
|
|
|
<div class="calc-item">
|
|
|
- <div class="calc-item-text">18888.888</div>
|
|
|
+ <div class="calc-item-text">{{ tongji.inT }}</div>
|
|
|
<div class="calc-item-desc">入账总额(元)</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -48,8 +48,8 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="清账状态">
|
|
|
- <el-select v-model="formInline.id" clearable placeholder="请选择" style="width: 120px;">
|
|
|
- <el-option v-for="item in formInline.options" :key="item.id" :label="item.hotelTownship" :value="item.id">
|
|
|
+ <el-select v-model="formInline.qz_id" clearable placeholder="请选择" style="width: 120px;">
|
|
|
+ <el-option v-for="item in formInline.clear_qz" :key="item.qz_id" :label="item.label" :value="item.qz_id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -63,60 +63,15 @@
|
|
|
</el-form>
|
|
|
<div class="btns">
|
|
|
<el-button type="primary" class="qingzhang" @click="toggle_qingzhang">清账/取消</el-button>
|
|
|
- <el-button type="primary" icon="el-icon-download" class="export" @click="exportExcel">导出订单</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-download" class="btn-export" @click="exportExcel">导出订单</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table :data="tableData" height="466" style="width: 100%" :cell-style="cell_style" v-loading="loading" :key='Math.random()'
|
|
|
- :header-cell-style="header_cell_style">
|
|
|
+ <el-table :data="tableData" height="466" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
+ :header-cell-style="header_cell_style" @selection-change="handle_table_change">
|
|
|
<el-table-column type="selection" width="50"></el-table-column>
|
|
|
- <el-table-column type="expand" width="38" fixed="left">
|
|
|
- <template slot-scope="props">
|
|
|
- <el-form label-position="left" inline class="demo-table-expand">
|
|
|
- <el-form-item label="民宿联系人">
|
|
|
- <span>{{ props.row.hotelPerson }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="民宿联系电话">
|
|
|
- <span>{{ props.row.hotelPhone }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="酒店类型">
|
|
|
- <span>{{ props.row.hotelType }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="酒店位置">
|
|
|
- <span>{{ props.row.hotelHposition }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="酒店名称">
|
|
|
- <span>{{ props.row.hotelName }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="酒店位置经纬度">
|
|
|
- <span>{{ props.row.hotelHpositionWens }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="接单设置">
|
|
|
- <span>{{ props.row.hotelIsCanorder == 1 ? '自动接单' : '手动接单' }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="酒店状态(1 营业 2.休息)">
|
|
|
- <span>{{ props.row.hotelStatus }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开业时间">
|
|
|
- <span>{{ props.row.openTime }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="装修时间">
|
|
|
- <span>{{ props.row.fitupTime }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="订单创建时间">
|
|
|
- <span>{{ props.row.createTime }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="入住时间">
|
|
|
- <span>{{ props.row.liveTime }}</span>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="离店时间">
|
|
|
- <span>{{ props.row.checkOutTime }}</span>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="交易时间" align="center" width="155" fixed="left">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.hotelTownshipName }}</span>
|
|
|
+ <span>{{ scope.row.payTime }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="所属乡镇" align="center" width="120" fixed="left">
|
|
|
@@ -141,12 +96,12 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="支付金额(元)" align="center" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.houseTotalPrice }}</span>
|
|
|
+ <span>{{ scope.row.payAccount }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="退款金额(元)" align="center" width="150">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.houseTotalPrice }}</span>
|
|
|
+ <span>{{ scope.row.refundAmount }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="入账金额(元)" align="center" width="160">
|
|
|
@@ -161,17 +116,17 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="清账状态" align="center" width="100" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.houseTotalPrice }}</span>
|
|
|
+ <span v-if="scope.row.saccountState == 1" style="color: rgba(10, 118, 78, 1.0);">已清账</span>
|
|
|
+ <span v-else style="color: rgba(248, 138, 100, 1.0);">未清账</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="清账时间" align="center" width="155" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.checkOutTime }}</span>
|
|
|
+ <span>{{ scope.row.saccountTime }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="pagination-table">
|
|
|
- <div class="txt-notice">订单总额:<span>{{ sumAccount }}元</span></div>
|
|
|
<el-pagination @current-change="currentPageChange" :current-page.sync="pagination.currentPage" :page-size="pagination.pageSize"
|
|
|
layout="prev, pager, next, jumper" :total="pagination.total">
|
|
|
</el-pagination>
|
|
|
@@ -188,7 +143,7 @@
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button class="add-user-cancel-btn" @click="dialog_qingzhang = false"> 取消 </el-button>
|
|
|
- <el-button class="add-user-confirm-btn" @click=""> 确定 </el-button>
|
|
|
+ <el-button class="add-user-confirm-btn" @click="handle_qingzhang"> 确定 </el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -198,8 +153,13 @@
|
|
|
import {
|
|
|
getTableData,
|
|
|
getTowns,
|
|
|
- downloadExcel
|
|
|
+ downloadExcel,
|
|
|
+ bookmodifyAaccountStatus,
|
|
|
+ bookqueryLedgerTj
|
|
|
} from '@/api/stdbookMgr'
|
|
|
+ import {
|
|
|
+ isEmpty
|
|
|
+ } from '@/js/common'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
@@ -207,7 +167,6 @@
|
|
|
currentUserLevel: this.$store.state.user.level, // 当前用户的权限
|
|
|
dialogImageUrl: '',
|
|
|
formLabelWidth: '120px',
|
|
|
- sumAccount: '', // 总金额
|
|
|
// 表格单元格样式
|
|
|
cell_style: {
|
|
|
color: '#1A202B',
|
|
|
@@ -228,6 +187,14 @@
|
|
|
amount1: '',
|
|
|
amount2: '',
|
|
|
search_datatime: '',
|
|
|
+ clear_qz: [{
|
|
|
+ qz_id: 1,
|
|
|
+ label: '已清账'
|
|
|
+ }, {
|
|
|
+ qz_id: 0,
|
|
|
+ label: '未清账'
|
|
|
+ }],
|
|
|
+ qz_id: '',
|
|
|
keyword: ''
|
|
|
},
|
|
|
tableData: [],
|
|
|
@@ -239,7 +206,17 @@
|
|
|
total: 0
|
|
|
},
|
|
|
loading: true,
|
|
|
- dialog_qingzhang: false
|
|
|
+ dialog_qingzhang: false,
|
|
|
+ bookmodifyAaccountStatus_data: {
|
|
|
+ saccountState: 1,
|
|
|
+ hotelConfigList: []
|
|
|
+ },
|
|
|
+ tongji: {
|
|
|
+ orderT: 0.00.toFixed(2),
|
|
|
+ payT: 0.00.toFixed(2),
|
|
|
+ refundT: 0.00.toFixed(2),
|
|
|
+ inT: 0.00.toFixed(2)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -252,6 +229,8 @@
|
|
|
}
|
|
|
// 获取消费记录,表格数据
|
|
|
this.get_table_data('list')
|
|
|
+ // 调用台账统计查询
|
|
|
+ this.bookqueryLedgerTj()
|
|
|
// 获取乡镇
|
|
|
this.get_towns()
|
|
|
},
|
|
|
@@ -259,8 +238,83 @@
|
|
|
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 台账统计查询实现
|
|
|
+ bookqueryLedgerTj() {
|
|
|
+ this.get_condtion();
|
|
|
+
|
|
|
+ var that = this
|
|
|
+ bookqueryLedgerTj(this.cond_data).then((res) => {
|
|
|
+ // console.log(res);
|
|
|
+ if (res.code === 200) {
|
|
|
+ that.tongji.orderT = res.orderT.tj.toFixed(2)
|
|
|
+ that.tongji.payT = res.payT.tj.toFixed(2)
|
|
|
+ that.tongji.refundT = res.refundT.tj.toFixed(2)
|
|
|
+ that.tongji.inT = res.inT.tj.toFixed(2)
|
|
|
+ } else {
|
|
|
+ that.tongji.orderT = 0.00.toFixed(2)
|
|
|
+ that.tongji.payT = 0.00.toFixed(2)
|
|
|
+ that.tongji.refundT = 0.00.toFixed(2)
|
|
|
+ that.tongji.inT = 0.00.toFixed(2)
|
|
|
+ }
|
|
|
+ }).catch((err) => {
|
|
|
+ that.$message.error(err.message)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取选择的文章ids
|
|
|
+ handle_table_change(selection) {
|
|
|
+ // console.log(selection);
|
|
|
+ // 保存要删除和更新的ids
|
|
|
+ var qz = 0
|
|
|
+ var clear_qz = 0
|
|
|
+ this.bookmodifyAaccountStatus_data.hotelConfigList = []
|
|
|
+ selection.forEach(row => {
|
|
|
+ this.bookmodifyAaccountStatus_data.hotelConfigList.push(row.id)
|
|
|
+ if (row.saccountState == 1) {
|
|
|
+ clear_qz++
|
|
|
+ } else {
|
|
|
+ qz++
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if (qz > 0 && clear_qz > 0) {
|
|
|
+ const h = this.$createElement;
|
|
|
+ this.$msgbox({
|
|
|
+ title: '消息',
|
|
|
+ message: h('p', null, [
|
|
|
+ h('div', {
|
|
|
+ style: 'color: red; text-align: center;'
|
|
|
+ }, '选择存在【待清账】和【待取消清账】:'),
|
|
|
+ h('div', {
|
|
|
+ style: 'color: teal; text-align: center;'
|
|
|
+ }, '【待清账】 ' + qz + ' 条'),
|
|
|
+ h('div', {
|
|
|
+ style: 'color: teal; text-align: center;'
|
|
|
+ }, '【待取消】 ' + clear_qz + ' 条')
|
|
|
+ ]),
|
|
|
+ confirmButtonText: '我知道了',
|
|
|
+ }).then(action => {});
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 清账/取消清账
|
|
|
+ handle_qingzhang() {
|
|
|
+ bookmodifyAaccountStatus(this.bookmodifyAaccountStatus_data).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.get_table_data('list')
|
|
|
+ this.$message.success(res.message)
|
|
|
+ this.dialog_qingzhang = false
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message)
|
|
|
+ }
|
|
|
+ }).catch((err) => {
|
|
|
+ this.$message.error(err.message)
|
|
|
+ });
|
|
|
+ },
|
|
|
// 清账切换
|
|
|
toggle_qingzhang() {
|
|
|
+ if (isEmpty(this.bookmodifyAaccountStatus_data.hotelConfigList)) {
|
|
|
+ this.$message.warning('请选择记录')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.dialog_qingzhang = true
|
|
|
},
|
|
|
// 获取乡镇列表
|
|
|
@@ -312,8 +366,6 @@
|
|
|
for (var i = 0; i < d.bookIPage.pageList.length; i++) {
|
|
|
that.tableData.push(d.bookIPage.pageList[i])
|
|
|
}
|
|
|
-
|
|
|
- that.sumAccount = d.sumAccount.toFixed(2)
|
|
|
} else {
|
|
|
that.tableData = []
|
|
|
that.$message.warning('没有符合条件的数据!')
|
|
|
@@ -348,6 +400,10 @@
|
|
|
if (this.formInline.search_datatime !== '') {
|
|
|
data.search_datatime = this.formInline.search_datatime
|
|
|
}
|
|
|
+
|
|
|
+ if (this.formInline.qz_id !== '') {
|
|
|
+ data.qz_id = this.formInline.qz_id
|
|
|
+ }
|
|
|
|
|
|
if (this.formInline.keyword !== '') {
|
|
|
data.keyword = this.formInline.keyword
|
|
|
@@ -379,6 +435,7 @@
|
|
|
* 搜索
|
|
|
*/
|
|
|
btn_search() {
|
|
|
+ this.bookqueryLedgerTj()
|
|
|
this.get_table_data('search')
|
|
|
},
|
|
|
/**
|
|
|
@@ -504,7 +561,7 @@
|
|
|
flex-wrap: wrap;
|
|
|
align-items: center;
|
|
|
justify-content: flex-start;
|
|
|
-
|
|
|
+
|
|
|
.el-form-item {
|
|
|
margin-bottom: 16px;
|
|
|
margin-right: 5px;
|
|
|
@@ -528,7 +585,7 @@
|
|
|
border: none;
|
|
|
}
|
|
|
|
|
|
- .export {
|
|
|
+ .btn-export {
|
|
|
background: rgba(9, 101, 98, 1);
|
|
|
font-size: 14px;
|
|
|
color: #FFFFFF;
|
|
|
@@ -536,7 +593,7 @@
|
|
|
border-radius: 5px;
|
|
|
border: none;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.btns {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -546,11 +603,10 @@
|
|
|
|
|
|
.pagination-table {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
+ justify-content: flex-end;
|
|
|
align-items: center;
|
|
|
height: 30px;
|
|
|
margin-top: 20px;
|
|
|
- padding-right: 100px;
|
|
|
|
|
|
.txt-notice {
|
|
|
|
|
|
@@ -610,18 +666,18 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.dialog-qingzhang-body {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
height: 180px;
|
|
|
-
|
|
|
+
|
|
|
img {
|
|
|
width: 72px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.dialog-qingzhang-body-txt {
|
|
|
height: 38px;
|
|
|
line-height: 38px;
|
|
|
@@ -654,29 +710,29 @@
|
|
|
margin-bottom: 0;
|
|
|
width: 33%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.dialog-footer {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
margin-top: -10px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.dialog-qingzhang {
|
|
|
height: 300px !important;
|
|
|
width: 500px !important;
|
|
|
margin-top: 330px !important;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.dialog-qingzhang .el-dialog__header {
|
|
|
display: none !important;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.add-user-cancel-btn {
|
|
|
color: rgba(9, 101, 98, 1) !important;
|
|
|
border: 1px solid rgba(9, 101, 98, 1) !important;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.add-user-confirm-btn {
|
|
|
border: none !important;
|
|
|
background: rgba(9, 101, 98, 1) !important;
|