Commit faa156eb24e52bcea553c6a6635ed30931c6e0dd

Authored by wangfan
1 parent e6302c43

most_pnum

... ... @@ -162,4 +162,35 @@ Page({
console.log(this.data.form)
this.getbooklist();
},
exportFile(){
App.Reserve.ExportReserve().then(res=>{
let url=res.data;
wx.downloadFile({
url: url,
success: function(res) {
const filePath = res.tempFilePath;
console.log('filePath',filePath);
wx.saveFile({
tempFilePath: filePath,
success (res) {
const savedFilePath = res.savedFilePath;
console.log('savedFilePath',savedFilePath);
wx.openDocument({
filePath: savedFilePath,
fileType:'xls',
success: function(res) {
console.log('打开文档成功')
},
fail(e){
console.log('打开文档失败',e)
},
})
}
})
}
})
});
},
})
\ No newline at end of file
... ...
... ... @@ -2,9 +2,15 @@
<view class="page">
<block wx:if="{{isloading==true}}">
<view class="book-page bg_white">
<view class="book-search flex-ll">
<image src="../image/search.png" class="search-icon"></image>
<input placeholder="桌位·预定人姓名·手机号" placeholder-class="font30r gray-font smooth" class="font30r black-font smooth search-input" value="{{keywords}}" bindinput="searchinput" confirm-type="search" bindconfirm="searchbook"/>
<view class="book-search flex-lr">
<view class="flex-ll book-search-left">
<image src="../image/search.png" class="search-icon"></image>
<input placeholder="桌位·预定人姓名·手机号" placeholder-class="font30r gray-font smooth" class="font30r black-font smooth search-input" value="{{keywords}}" bindinput="searchinput" confirm-type="search" bindconfirm="searchbook"/>
</view>
<view bindtap="exportFile" class="exportFile flex-vc">
<image src="../image/export.png" class="search-icon"></image>
<view>导出</view>
</view>
</view>
<view class="search-easy flex-lr">
<formids class="block flex-vc" bindtap="calendarShow">
... ... @@ -34,7 +40,7 @@
<nothingBook height="{{listHeight}}"></nothingBook>
</block>
<block wx:else>
<view class="book-list-cut flex-ll font26r black-font">
<view class="book-list-cut flex-lr font26r black-font">
<text>已定 {{bookList.length}}</text>
</view>
<view bindcsroll="onPullDownRefresh" class="bg_white">
... ...
... ... @@ -10,12 +10,17 @@ page{
padding-top:20rpx;
}
.book-search{
width:590rpx;
width:675rpx;
height:80rpx;
border-radius:40rpx;
box-shadow: 0 0 8px #ccc;
margin:0 auto;
margin-bottom:10rpx;
margin:0 auto;
}
.book-search-left{
width:590rpx;
height:80rpx;
border-radius:40rpx;
box-shadow: 0 0 8px #ccc;
margin:0 auto;
margin-bottom:10rpx;
}
.search-icon{
width:40rpx;
... ... @@ -124,4 +129,13 @@ page{
.calendar-board {
background-color: #dddcff;
color: white;
}
.exportFile{
font-size: 26rpx;
color:#353535;
}
.exportFile image{
width: 32rpx;
height: 32rpx;
margin: 0 auto 8rpx;
}
\ No newline at end of file
... ...
... ... @@ -77,6 +77,9 @@ export default {
//商户端账号表增加订座儿openid
'App.Reserve.UpdateSellerUser':{
cachetime:86400,
}
},
//导出
'App.Reserve.ExportReserve':null,
}
\ No newline at end of file
... ...