Commit 369f2c5f8c70ac7678f03f51031fffd6bbc298da

Authored by vking
1 parent 77bdc809

运营接单

... ... @@ -16,7 +16,7 @@ Component({
pi: 0,
dot:0,
hasEditorFlag:false,//添加预订
hasReserveOrder:false,//处理在线预订
hasReserveOrder:true,//运营处理在线预订
tabsHidden:true,
},
attached(){
... ...
// pack-book/pages/book/b_reserve.js
// pages/book/setting/index.js
import util from '../../../utils/util';
import App from '../../../utils/api';
const {regeneratorRuntime} = global
import PubSub from '../../../utils/PubSub'
import RS from '../../../utils/reserveStatus'
Page({
offset: 1,
limit: 10,
hasMore: true,
list:[],
/**
* 页面的初始数据
*/
data: {
list:[],
hasMore:true,
},
/**
* 生命周期函数--监听页面加载
*/
enter_params: {},
onLoad: function (options) {
this.enter_params = util.cache('enter_params');
this.seller_id=options.seller_id||this.enter_params.seller_id;
this.getMembers();
},
/**
... ... @@ -35,32 +48,47 @@ Page({
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload(){
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if(this.hasMore){
this.getMembers(true);
}
},
getMembers(hasReachBottom=false){
let params={
sid:this.seller_id,
x:this.offset,
y:this.limit,
rdate:'1234567890-9999999999',
sort:1,
}
App.Reserve.GetReserveList(params).then((res)=>{
let list = res.data
if(list.length>0){
list.forEach((r,i)=>{
list[i]=RS.reserve(r)
})
}
this.list=this.list.concat(list)
let obj={list:this.list};
if(list.length<this.limit && hasReachBottom){
this.hasMore=false;
obj.hasMore=false;
}else{
this.offset++;
}
this.setData(obj)
}).catch(e=>{})
},
gotoDetail(e){
let url='./b_detail?id='+util.attr(e,'id')
return wx.navigateTo({
url:url
})
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"usingComponents": {}
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle":"white",
"usingComponents": {
"nav":"/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pack-book/pages/book/b_reserve.wxml-->
<text>pack-book/pages/book/b_reserve.wxml</text>
<wxs src="../../../utils/util.wxs" module="util" />
<nav id="nav" backgroundColor="#199095" color="#fefefe">在线预定</nav>
<view class="pages">
<block wx:if="{{list.length>0}}">
<view class="row" wx:for="{{list}}" wx:key="list.key" data-id="{{item.id}}" bindtap="gotoDetail">
<view class="flex-ll">
<view class="label">包间需求:</view>
<view class="content">{{item.room_demand_str||''}}</view>
</view>
<view class="flex-ll">
<view class="label">就餐时间:</view>
<view class="content">{{util.unixtoTime(item.ddate,'YYYY-MM-DD HH:II')}}</view>
</view>
<view class="flex-lr">
<view class="flex-ll">
<view class="label">预订客户:</view>
<view class="content">{{item.rname}}</view>
</view>
<view class="button">立即处理</view>
</view>
</view>
</block>
<view wx:else="" class="history-is-empty flex-vc Medium">
<image src="http://qn.colorcun.com/custom/lite-yd/image/history-is-empty.png"></image>
<view>暂时还没有客户</view>
</view>
<view wx:if="{{!hasMore}}" class="row flex-vc">已经到底了</view>
</view>
... ...
/* pack-book/pages/book/b_reserve.wxss */
\ No newline at end of file
/* pack-book/pages/book/b_reserve.wxss */
.pages{
width: 90%;
margin: 0 auto 50rpx;
color: #353535;
overflow-y: auto;
}
.row{
font-size: 34rpx;
border-bottom: 2rpx solid #F1F0F4;
padding-top: 34rpx;
padding-bottom: 34rpx;
}
.history-is-empty{
margin: 200rpx auto;
font-size: 34rpx;
}
.history-is-empty image{
width: 376rpx;
height: 310rpx;
margin-bottom: 122rpx;
}
.button{
background-color: #199095;
color: #fefefe;
border-radius: 10rpx;
padding: 2rpx 10rpx;
}
\ No newline at end of file
... ...
... ... @@ -220,7 +220,7 @@
"id": 21,
"name": "预订本-80商家",
"pathName": "pack-book/pages/book/b_index",
"query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=763&rid=33347",
"query": "seller_id=80&seller_openid=oGefL4qKBWIh5xwyg3LVfkMbDumA&manager_id=763&rid=33354",
"scene": 1001
},
{
... ... @@ -501,6 +501,13 @@
"pathName": "pack-book/pages/book/b_detail",
"query": "id=33284",
"scene": null
},
{
"id": -1,
"name": "pack-book/pages/book/b_reserve",
"pathName": "pack-book/pages/book/b_reserve",
"query": "",
"scene": null
}
]
}
... ...
... ... @@ -42,6 +42,15 @@ export default {
return $1+'**'+$3
})
}
//room_demand
if(detail.room_demand && typeof detail.room_demand=='string'){
detail.room_demand=JSON.parse(detail.room_demand)
detail.room_demand_str=detail.room_demand[0].name
let how=detail.room_demand.length
if(how>1){
detail.room_demand_str+=' 等'+how+'间'
}
}
return detail;
},
hasRunningFlag(detail){//判断订单正在运行
... ...