|
|
@@ -53,6 +53,16 @@
|
|
|
|
|
|
<template #slot-top-element>
|
|
|
<el-input v-model="name" placeholder="搜索客户" size="big" style="width:400px;" ref="customSearchRef" @input="changeText()"></el-input>
|
|
|
+
|
|
|
+ <el-popover style="margin-left:40px;" placement="top" width="160" ref="openCloseBookRef">
|
|
|
+ <p>确认{{ shopInfo.bookSn==0?'开启':'结束' }}?</p>
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button size="mini" type="text" @click.stop="cancelBook">取消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click.stop="changeBook(shopInfo.bookSn)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button slot="reference" type="primary">{{ shopInfo.bookSn==0?'开启预订':'结束预订' }}</el-button>
|
|
|
+ </el-popover>
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
</x-crud>
|
|
|
@@ -83,7 +93,8 @@ export default {
|
|
|
confirmMobile1:'',
|
|
|
addPop:false,
|
|
|
name:'',
|
|
|
- fileUrl:''
|
|
|
+ fileUrl:'',
|
|
|
+ shopInfo:{}
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -103,6 +114,17 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['getLevel']),
|
|
|
+ cancelBook(){
|
|
|
+ this.$refs['openCloseBookRef'].doClose()
|
|
|
+ },
|
|
|
+ changeBook(bookSn){
|
|
|
+ this.$refs['openCloseBookRef'].doClose()
|
|
|
+ let status = bookSn == 0 ? 1 : 0
|
|
|
+ return this.$service.book.changeBook({status:status}).then((res) => {
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.app.refresh({status:this.tabIndex,search:this.search})
|
|
|
+ })
|
|
|
+ },
|
|
|
fileUpSuccess(response){
|
|
|
if(response.code == 1){
|
|
|
this.$notify({ title: '提交成功', message: 'success', type: 'success'})
|
|
|
@@ -231,6 +253,7 @@ export default {
|
|
|
])
|
|
|
.on('refresh', async (params, { next }) => {
|
|
|
let result = await next(params)
|
|
|
+ this.shopInfo = result.shopInfo
|
|
|
})
|
|
|
.done();
|
|
|
app.refresh({ type: this.tabIndex,name:this.name })
|