Commit fd7eb281a4be0b0b89de20f8061564598b8ed5d9

Authored by wangfan
1 parent 99876381

smsbatch

... ... @@ -94,7 +94,7 @@ Component({
}
})
}
util.rpc(uri.CGI__USER_GETCOOKBOOKSELBYSPECSID,{
App.Cookbook.GetCookbookSelBySpecsId({
sellerid:this.data.sellerid,
orderid: this.data.orderid,
cookbookid: this.data.item.id,
... ... @@ -130,7 +130,7 @@ Component({
var foodMenuPrice=foodMenu[0].price;
var practice_id=foodMenu[0].id;
}
util.rpc(uri.CGI__USER_GETCOOKBOOKSELBYSPECSID,{
App.Cookbook.GetCookbookSelBySpecsId({
sellerid:this.data.sellerid,
orderid: this.data.orderid,
cookbookid: this.data.item.id,
... ... @@ -239,7 +239,7 @@ Component({
type:1,
});
//this.matchArray(cookbookid,1,countTotal,countPirce)
util.post(uri.CGI__USER_ADDCRAT,{
App.Orders.AddCart({
orderid: this.data.orderid,
openid:util.cache('openid'),
cookbookid:cookbookid,
... ... @@ -248,7 +248,7 @@ Component({
request_uri: this.data.request_uri == true ? 1 : '',//服务员通过消息通知进来 又加菜的标识
fromSoucre:this.data.fromSoucre?this.data.fromSoucre:'',
identity:util.cache('identity')
},uri.CGI__USER_ADDCRAT__CODE,'0','0');
});
});
},
//减菜面板
... ... @@ -269,7 +269,7 @@ Component({
type:-1,
});
util.post(uri.CGI__USER_REDUCEORDER, {
App.Orders.ReduceOrder({
orderid: this.data.orderid,
openid: getApp().openid,
cookbookid: cookbookid,
... ... @@ -279,7 +279,7 @@ Component({
request_uri: this.data.request_uri == true ? 1 : '',//服务员通过消息通知进来 又加菜的标识
status:this.data.fromSoucre!=''?2:'',//只查没有下单的
source: 2,
}, uri.CGI__USER_REDUCEORDER__CODE, '0', '0');
});
});
},
//减菜面板加菜按钮
... ... @@ -351,7 +351,7 @@ Component({
if(practice_id>0){
params.practiceid=practice_id;
}
util.post(uri.CGI__USER_REDUCEORDER, params, uri.CGI__USER_REDUCEORDER__CODE, '0', '0');
App.Orders.ReduceOrder(params);
},
/**
*
... ... @@ -431,7 +431,7 @@ Component({
if(practice_id>0){
param.practiceid=practice_id;
}
util.post(uri.CGI__USER_ADDCRAT,param,uri.CGI__USER_ADDCRAT__CODE,'0','0');
App.Orders.AddCart(param);
},
//清除订单下某菜品所有数量
clean(){
... ... @@ -440,11 +440,11 @@ Component({
cookbookid:cookbookid,
type:this.data.item.num*-1
});
util.post(uri.CGI__USER_CLEARCOOKBYID,{
App.Orders.ClearCookById({
orderid: this.data.orderid,
sellerid: this.data.sellerid,
cookbookid:cookbookid
},uri.CGI__USER_CLEARCOOKBYID__CODE,'0','0');
});
}
}
})
... ...
... ... @@ -188,4 +188,68 @@ Page({
});
},
foodCardCallback(e){
let opt=e.detail;
console.log('foodCardCallback',opt);
if(opt.type=='specWin'){
if(opt.value=='show'){
this.setData({scrollZindex:9999});
}else{
this.setData({scrollZindex:'auto'});
}
return;
}
let books=this.data.cookbooklist;
books.forEach(menu=>{
menu.cookbooklist[0].forEach(book=>{
if(book.id==opt.cookbookid){
book.num=opt.num;
}
})
})
this.setData({
countTotal:this.data.countTotal+opt.type,
cookbooklist:books
});
this.getOrderInfo();
},
//订单详情
getOrderInfo:function(){
App.Orders.GetOrderById({orderid:this.data.orderid}).then(json=>{
let order=json.data[0].order[0];
if(order.status<2){
this.setData({aiOrderStatus:json.data[0].order[0].status});
}else{
var title=''
if(json.data[0].order[0].status==2 || json.data[0].order[0].status==3){
if(this.data.fromSoucre || util.cache('identity')==2){
return;
}
title='手慢了,小伙伴已下单'
}
if(json.data[0].order[0].status==5){
title='订单已结账'
}
if(json.data[0].order[0].status==7){
title='订单已清台'
}
wx.showToast({
icon:'none',
title:title,
duration:1500,
});
let that=this;
setTimeout(function(){
if(json.data[0].order[0].status>5){
wx.reLaunch({
url:'/pages/menu/s_nothing?sellerid='+that.data.sellerid+'&orderid='+that.data.orderid,
})
}else{
that.goToOrder(that.data.orderid)
}
},1500)
}
})
},
})
\ No newline at end of file
... ...
... ... @@ -95,7 +95,18 @@ export default {
alias:'App.Pay.WxPaySub',
},
//菜品列表
'App.Cookbook.GetCookbookByClass':null,
/**提前点餐**/
//菜品列表
'App.Cookbook.GetCookbookByClass':null,
//菜品规格
'App.Cookbook.GetCookbookSelBySpecsId':null,
//添加到购物车
'App.Orders.AddCart':null,
//减菜
'App.Orders.ReduceOrder':null,
//清空购物车
'App.Orders.ClearCookById':null,
//购物车
'App.Orders.GetOrderById':null,
}
\ No newline at end of file
... ...