|
|
@@ -1,13 +1,971 @@
|
|
|
<template>
|
|
|
- <div>参数配置</div>
|
|
|
+ <div>
|
|
|
+ <a-row :gutter="[10,16]">
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-card>
|
|
|
+ <div class="item">
|
|
|
+ <div class="item_header">
|
|
|
+ <div class="item_header_left">
|
|
|
+ <div class="item_header_left_logo">
|
|
|
+ <img class="logo" src="~@/assets/eye.png">
|
|
|
+ </div>
|
|
|
+ <div class="item_header_left_title">
|
|
|
+ 夜审
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_header_right">
|
|
|
+ <a-switch checked-children="自动" un-checked-children="手动" default-checked
|
|
|
+ v-model="nightTrialModel.autoCheck"
|
|
|
+ @change="e=>onNightTrialCheckChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content">
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">夜审时间</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-time-picker :open.sync="open" v-model="nightTrialModel.setNightTrialTime" format="HH:mm:ss" style="width: 80%">
|
|
|
+ <a-button slot="addon" size="small" @click="handleNightTrialCancel">
|
|
|
+ 取消
|
|
|
+ </a-button>
|
|
|
+ <a-button class="margin_left_6" slot="addon" size="small" type="primary" @click="handleNightTrialConfirm">
|
|
|
+ 确定
|
|
|
+ </a-button>
|
|
|
+ </a-time-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">自动交班</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-switch checked-children="已开" un-checked-children="已关" default-checked
|
|
|
+ v-model="nightTrialModel.autoHand"
|
|
|
+ @change="e=>onNightTrialHandChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-card>
|
|
|
+ <div class="item">
|
|
|
+ <div class="item_header">
|
|
|
+ <div class="item_header_left">
|
|
|
+ <div class="item_header_left_logo">
|
|
|
+ <img class="logo" src="~@/assets/clear.png">
|
|
|
+ </div>
|
|
|
+ <div class="item_header_left_title">
|
|
|
+ 清扫房间选择服务员
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_header_right">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content">
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">清扫房间选择服务员</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right_1">
|
|
|
+ <a-switch checked-children="开启" un-checked-children="关闭" default-checked
|
|
|
+ v-model="clearModel.status"
|
|
|
+ @change="e=>onClearChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-card>
|
|
|
+ <div class="item">
|
|
|
+ <div class="item_header">
|
|
|
+ <div class="item_header_left">
|
|
|
+ <div class="item_header_left_logo">
|
|
|
+ <img class="logo" src="~@/assets/clear.png">
|
|
|
+ </div>
|
|
|
+ <div class="item_header_left_title">
|
|
|
+ 房务管理
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_header_right">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content">
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">开启房务管理功能</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right_1">
|
|
|
+ <a-switch checked-children="开启" un-checked-children="关闭" default-checked
|
|
|
+ v-model="houseSettingModel.status"
|
|
|
+ @change="e=>onHouseSettingChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-card>
|
|
|
+ <div class="item">
|
|
|
+ <div class="item_header">
|
|
|
+ <div class="item_header_left">
|
|
|
+ <div class="item_header_left_logo">
|
|
|
+ <img class="logo" src="~@/assets/clear.png">
|
|
|
+ </div>
|
|
|
+ <div class="item_header_left_title">
|
|
|
+ 押金设置
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_header_right">
|
|
|
+ <div v-show="show_deposit">
|
|
|
+ <a-button type="primary" shape="circle" icon="check" size="small"
|
|
|
+ @click="handleDepositConfirm">
|
|
|
+ </a-button>
|
|
|
+ <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
|
|
|
+ @click="handleDepositCancel">
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content">
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">计算公式</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-radio-group :value="depositModel.type" @change="handleDepositChange">
|
|
|
+ <a-radio-button value="1">
|
|
|
+ 乘法
|
|
|
+ </a-radio-button>
|
|
|
+ <a-radio-button value="2">
|
|
|
+ 加法
|
|
|
+ </a-radio-button>
|
|
|
+ <a-radio-button value="3">
|
|
|
+ 固定
|
|
|
+ </a-radio-button>
|
|
|
+ </a-radio-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">押金=</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <div class="row_right_tip" v-show="depositModel.type != 3">
|
|
|
+ <span class="margin_right_4">房费</span>
|
|
|
+ <span class="margin_right_4">{{depositModel.formula}}</span>
|
|
|
+ </div>
|
|
|
+ <a-input-number v-show="depositModel.type == 1" :precision="2"
|
|
|
+ @change="onDepositChange()"
|
|
|
+ v-model="depositModel.multiple" :min="0" :max="999999" />
|
|
|
+ <a-input-number v-show="depositModel.type != 1" :precision="2"
|
|
|
+ @change="onDepositChange()"
|
|
|
+ v-model="depositModel.money" :min="0" :max="999999" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">余额报警</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-switch checked-children="已开" un-checked-children="已关" default-checked
|
|
|
+ v-model="depositModel.alarm"
|
|
|
+ @change="e=>onDepositAlarmChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">余额小于</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-input-number :precision="2" v-model="depositModel.less" :min="0" :max="999999"
|
|
|
+ @change="onDepositChange()" />
|
|
|
+ <div class="margin_left_6">时报警</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-card>
|
|
|
+ <div class="item">
|
|
|
+ <div class="item_header">
|
|
|
+ <div class="item_header_left">
|
|
|
+ <div class="item_header_left_logo">
|
|
|
+ <img class="logo" src="~@/assets/clear.png">
|
|
|
+ </div>
|
|
|
+ <div class="item_header_left_title">
|
|
|
+ 撤销入住
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_header_right">
|
|
|
+ <div v-show="show_cancel">
|
|
|
+ <a-button type="primary" shape="circle" icon="check" size="small"
|
|
|
+ @click="handleCancelConfirm">
|
|
|
+ </a-button>
|
|
|
+ <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
|
|
|
+ @click="handleCancelCancel">
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content">
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">撤销开关</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-switch checked-children="已开" un-checked-children="已关" default-checked
|
|
|
+ v-model="cancelModel.status"
|
|
|
+ @change="e=>onCancelStatusChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">有效分钟</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right">
|
|
|
+ <a-input-number :precision="2" v-model="cancelModel.minute" :min="0" :max="999999"
|
|
|
+ @change="onCancelChange()" />
|
|
|
+ <div class="margin_left_6">内可撤</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-card>
|
|
|
+ <div class="item">
|
|
|
+ <div class="item_header">
|
|
|
+ <div class="item_header_left">
|
|
|
+ <div class="item_header_left_logo">
|
|
|
+ <img class="logo" src="~@/assets/clear.png">
|
|
|
+ </div>
|
|
|
+ <div class="item_header_left_title">
|
|
|
+ 其他
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_header_right">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content">
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">是否显示制卡</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right_1">
|
|
|
+ <a-switch checked-children="开启" un-checked-children="关闭" default-checked
|
|
|
+ v-model="roomCardModel.status"
|
|
|
+ @change="e=>onRoomCardChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">是否开启会员验证</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right_1">
|
|
|
+ <a-switch checked-children="开启" un-checked-children="关闭" default-checked
|
|
|
+ v-model="memberVerifyModel.status"
|
|
|
+ @change="e=>onMemberVerifyChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">空脏房可以入住</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right_1">
|
|
|
+ <a-switch checked-children="开启" un-checked-children="关闭" default-checked
|
|
|
+ v-model="emptyDirtyRoomModel.status"
|
|
|
+ @change="e=>onEmptyDirtyRoomChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="item_content_row">
|
|
|
+ <div class="row_left">
|
|
|
+ <div class="row_left_tip">查房完毕才能退房</div>
|
|
|
+ </div>
|
|
|
+ <div class="row_right_1">
|
|
|
+ <a-switch checked-children="开启" un-checked-children="关闭" default-checked
|
|
|
+ v-model="checkOutModel.status"
|
|
|
+ @change="e=>onCheckOutChange(e)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import { httpAction, getAction } from '@/api/manage'
|
|
|
+ import moment from 'moment';
|
|
|
export default {
|
|
|
- name: "paramSettings"
|
|
|
+ name: "paramSettings",
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ labelCol: {
|
|
|
+ xs: { span: 24 },
|
|
|
+ sm: { span: 6 },
|
|
|
+ },
|
|
|
+ wrapperCol: {
|
|
|
+ xs: { span: 24 },
|
|
|
+ sm: { span: 12 },
|
|
|
+ },
|
|
|
+ url:{
|
|
|
+ query_nighttrial:'/business/busNightTrial/queryByHotelId',
|
|
|
+ nighttrial_autocheck:'/business/busNightTrial/editAutoCheck',
|
|
|
+ nighttrial_time:'/business/busNightTrial/editNightTrialTime',
|
|
|
+ nighttrial_autohand:'/business/busNightTrial/editAutoHand',
|
|
|
+ query_clear:'/business/busClear/queryByHotelId',
|
|
|
+ clear_status:'/business/busClear/editStatus',
|
|
|
+ query_housesetting:'/business/busHouseSetting/queryByHotelId',
|
|
|
+ housesetting_status:'/business/busHouseSetting/editStatus',
|
|
|
+ query_deposit:'/business/busDepositSetting/queryByHotelId',
|
|
|
+ deposit_edit:'/business/busDepositSetting/editInfo',
|
|
|
+ query_cancel:'/business/busCancel/queryByHotelId',
|
|
|
+ cancel_edit:'/business/busCancel/editInfo',
|
|
|
+ query_roomcard:'/business/busOtherRoomCard/queryByHotelId',
|
|
|
+ roomcard_status:'/business/busOtherRoomCard/editStatus',
|
|
|
+ query_memberverify:'/business/busOtherMemberVerify/queryByHotelId',
|
|
|
+ memberverify_status:'/business/busOtherMemberVerify/editStatus',
|
|
|
+ query_emptydirtyroom:'/business/busOtherEmptyDirtyRoom/queryByHotelId',
|
|
|
+ emptydirtyroom_status:'/business/busOtherEmptyDirtyRoom/editStatus',
|
|
|
+ query_checkout:'/business/busOtherCheckout/queryByHotelId',
|
|
|
+ checkout_status:'/business/busOtherCheckout/editStatus',
|
|
|
+ },
|
|
|
+ hotelId:'',
|
|
|
+ open: false,
|
|
|
+ nightTrialModel:{
|
|
|
+ setNightTrialTime:moment('06:00:00','HH:mm:ss'),
|
|
|
+ autoCheck:true,
|
|
|
+ autoHand:true
|
|
|
+ },
|
|
|
+ clearModel:{
|
|
|
+ status:true
|
|
|
+ },
|
|
|
+ houseSettingModel:{
|
|
|
+ status:true
|
|
|
+ },
|
|
|
+ show_deposit:false,
|
|
|
+ depositModel:{
|
|
|
+ type:'1',
|
|
|
+ formula:'+',
|
|
|
+ money:100,
|
|
|
+ alarm:true,
|
|
|
+ alarmValue:1,
|
|
|
+ less:10.00,
|
|
|
+ multiple:0.5,
|
|
|
+ },
|
|
|
+ show_cancel:false,
|
|
|
+ cancelModel:{
|
|
|
+ status:true,
|
|
|
+ statusValue:1,
|
|
|
+ minute:60
|
|
|
+ },
|
|
|
+ roomCardModel:{
|
|
|
+ status:true
|
|
|
+ },
|
|
|
+ memberVerifyModel:{
|
|
|
+ status:true
|
|
|
+ },
|
|
|
+ emptyDirtyRoomModel:{
|
|
|
+ status:true
|
|
|
+ },
|
|
|
+ checkOutModel:{
|
|
|
+ status:true
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ //备份model原始值
|
|
|
+ this.initConfig()
|
|
|
+
|
|
|
+ var info = JSON.parse(localStorage.getItem("storeInfo"));
|
|
|
+ this.hotelId = info.id;
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ initConfig(){
|
|
|
+ // 获取夜审信息
|
|
|
+ getAction(this.url.query_nighttrial,{}).then((res)=>{
|
|
|
+ console.log(res)
|
|
|
+ if(res.success){
|
|
|
+ // this.nightTrialModel = res.result
|
|
|
+ var _time = moment(res.result.setNightTrialTime,'HH:mm:ss')
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ autoCheck:res.result.autoCheck == 1?true:false,
|
|
|
+ autoHand:res.result.autoHand == 1?true:false,
|
|
|
+ setNightTrialTime : _time
|
|
|
+ }
|
|
|
+ this.nightTrialModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 获取清扫信息
|
|
|
+ getAction(this.url.query_clear,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ }
|
|
|
+ this.clearModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 获取房务管理信息
|
|
|
+ getAction(this.url.query_housesetting,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ }
|
|
|
+ this.houseSettingModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 获取押金设置
|
|
|
+ getAction(this.url.query_deposit,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _data = res.result;
|
|
|
+ var _formula = _data.depositType == 1 ?'x':'+';
|
|
|
+ var _model = {
|
|
|
+ id:_data.id,
|
|
|
+ type:_data.depositType+'',
|
|
|
+ formula:_formula,
|
|
|
+ multiple:_data.depositMultiple,
|
|
|
+ money:_data.depositMoney,
|
|
|
+ alarm:_data.balanceAlarm == 1?true:false,
|
|
|
+ alarmValue:_data.balanceAlarm,
|
|
|
+ less:_data.balanceLess,
|
|
|
+ }
|
|
|
+ this.depositModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // 获取撤销入住信息
|
|
|
+ getAction(this.url.query_cancel,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ minute:res.result.minute
|
|
|
+ }
|
|
|
+ this.cancelModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //获取其他信息
|
|
|
+ //制卡
|
|
|
+ getAction(this.url.query_roomcard,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ }
|
|
|
+ this.roomCardModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //会员验证
|
|
|
+ getAction(this.url.query_memberverify,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ }
|
|
|
+ this.memberVerifyModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //空脏房
|
|
|
+ getAction(this.url.query_emptydirtyroom,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ }
|
|
|
+ this.emptyDirtyRoomModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ //退房
|
|
|
+ getAction(this.url.query_checkout,{}).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ var _model = {
|
|
|
+ id:res.result.id,
|
|
|
+ status:res.result.status == 1?true:false,
|
|
|
+ }
|
|
|
+ this.checkOutModel = _model
|
|
|
+ }else{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onNightTrialCheckChange(val){
|
|
|
+ console.log('夜审'+val)
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 自动
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.nightTrialModel.id?this.nightTrialModel.id:'';
|
|
|
+ var param = {
|
|
|
+ autoCheck :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.nighttrial_autocheck,param,'post').then((res)=>{
|
|
|
+
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.nightTrialModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleOpenChange(open) {
|
|
|
+ console.log('open', open);
|
|
|
+ this.open = open;
|
|
|
+ },
|
|
|
+ handleNightTrialCancel() {
|
|
|
+ this.open = false;
|
|
|
+ },
|
|
|
+ handleNightTrialConfirm() {
|
|
|
+ this.open = false;
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _time = moment(new Date(this.nightTrialModel.setNightTrialTime)).format('HH:mm:ss');
|
|
|
+ var _id = this.nightTrialModel.id?this.nightTrialModel.id:'';
|
|
|
+ var param = {
|
|
|
+ setNightTrialTime :_time,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+ httpAction(this.url.nighttrial_time,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.nightTrialModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onNightTrialHandChange(val){
|
|
|
+ console.log('夜审'+val)
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 自动
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.nightTrialModel.id?this.nightTrialModel.id:'';
|
|
|
+ var param = {
|
|
|
+ autoHand :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.nighttrial_autohand,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.nightTrialModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onClearChange(val){
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 开启
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.clearModel.id?this.clearModel.id:'';
|
|
|
+ var param = {
|
|
|
+ status :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.clear_status,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.clearModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onHouseSettingChange(val){
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 开启
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.houseSettingModel.id?this.houseSettingModel.id:'';
|
|
|
+ var param = {
|
|
|
+ status :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.housesetting_status,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.houseSettingModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleDepositChange(e){
|
|
|
+ console.log(e.target.value)
|
|
|
+ var _type = e.target.value;
|
|
|
+ this.depositModel.type = _type;
|
|
|
+ this.show_deposit = true;
|
|
|
+ if (_type == 1){
|
|
|
+ this.depositModel.formula = 'x'
|
|
|
+ }
|
|
|
+ if (_type == 2){
|
|
|
+ this.depositModel.formula = '+'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleDepositCancel(){
|
|
|
+ this.show_deposit = false;
|
|
|
+ },
|
|
|
+ handleDepositConfirm(){
|
|
|
+ // 押金设置提交
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.depositModel.id?this.depositModel.id:'';
|
|
|
+ var param = {
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id,
|
|
|
+ depositType:this.depositModel.type,
|
|
|
+ depositMultiple:this.depositModel.multiple,
|
|
|
+ depositMoney:this.depositModel.money,
|
|
|
+ balanceAlarm:this.depositModel.alarmValue,
|
|
|
+ balanceLess:this.depositModel.less,
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.deposit_edit,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.depositModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ that.show_deposit = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onDepositChange(){
|
|
|
+ this.show_deposit = true;
|
|
|
+ },
|
|
|
+ onDepositAlarmChange(val){
|
|
|
+ this.show_deposit = true;
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 自动
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.depositModel.alarmValue = _value;
|
|
|
+ },
|
|
|
+ onCancelChange(){
|
|
|
+ this.show_cancel = true;
|
|
|
+ },
|
|
|
+ onCancelStatusChange(val){
|
|
|
+ this.show_cancel = true;
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 自动
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.cancelModel.statusValue = _value;
|
|
|
+ },
|
|
|
+ handleCancelCancel(){
|
|
|
+ this.show_cancel = false;
|
|
|
+ },
|
|
|
+ handleCancelConfirm(){
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.cancelModel.id?this.cancelModel.id:'';
|
|
|
+ var param = {
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id,
|
|
|
+ status:this.cancelModel.statusValue,
|
|
|
+ minute:this.cancelModel.minute,
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.cancel_edit,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.cancelModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ that.show_cancel = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onRoomCardChange(val){
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 开启
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.roomCardModel.id?this.roomCardModel.id:'';
|
|
|
+ var param = {
|
|
|
+ status :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.roomcard_status,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.roomCardModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onMemberVerifyChange(val){
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 开启
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.memberVerifyModel.id?this.memberVerifyModel.id:'';
|
|
|
+ var param = {
|
|
|
+ status :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.memberverify_status,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.memberVerifyModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onEmptyDirtyRoomChange(val){
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 开启
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.emptyDirtyRoomModel.id?this.emptyDirtyRoomModel.id:'';
|
|
|
+ var param = {
|
|
|
+ status :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.emptydirtyroom_status,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.emptyDirtyRoomModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ onCheckOutChange(val){
|
|
|
+ var _value = 0;
|
|
|
+ if (val){
|
|
|
+ // 开启
|
|
|
+ _value = 1;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ var that = this;
|
|
|
+ var _id = this.checkOutModel.id?this.checkOutModel.id:'';
|
|
|
+ var param = {
|
|
|
+ status :_value,
|
|
|
+ hotelId:this.hotelId,
|
|
|
+ id:_id
|
|
|
+ }
|
|
|
+
|
|
|
+ httpAction(this.url.checkout_status,param,'post').then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ that.$message.success('操作成功');
|
|
|
+ that.$emit('ok');
|
|
|
+ that.checkOutModel.id = res.result.id
|
|
|
+ }else{
|
|
|
+ that.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
+<style lang="less" scoped>
|
|
|
+ .item{
|
|
|
+ text-align: center;
|
|
|
+ height: 220px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .item_header{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .item_header_left{
|
|
|
+ flex: 3;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ }
|
|
|
+ .item_header_left_logo{
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ .item_header_left_logo .logo{
|
|
|
+ width: 32px;
|
|
|
+ height: 32px;
|
|
|
+ max-height: 50px;
|
|
|
+ max-width: 50px;
|
|
|
+ }
|
|
|
+ .item_header_left_title{
|
|
|
+ flex: 2;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: black;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .item_header_right{
|
|
|
+ flex: 2;
|
|
|
+ }
|
|
|
+ .item_content{
|
|
|
+ padding-top: 15px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ justify-items: center;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ .item_content_row{
|
|
|
+ width: 90%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ padding-bottom: 12px;
|
|
|
+ }
|
|
|
+ .row_left{
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .row_left_tip{
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ .row_right{
|
|
|
+ flex: 2;
|
|
|
+ text-align: left;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .row_right_1{
|
|
|
+ flex: 1;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ .row_right_tip{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .row_middle{
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ .row_right {
|
|
|
+ /deep/ .ant-time-picker-panel-addon{
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .margin_left_6{
|
|
|
+ margin-left: 6px;
|
|
|
+ }
|
|
|
+ .margin_left_4{
|
|
|
+ margin-left: 4px;
|
|
|
+ }
|
|
|
+ .margin_right_4{
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+ /*.ant-time-picker-panel-addon{*/
|
|
|
+ /* text-align: right;*/
|
|
|
+ /*}*/
|
|
|
</style>
|