Commit 74d727f15d1ca58a6d79fba6d36af6a53d68c914

Authored by vking
1 parent 993f75f9

seller-do

... ... @@ -6,7 +6,7 @@ Component({
* 组件的属性列表
*/
properties: {
price:Number,
},
/**
... ... @@ -28,9 +28,10 @@ Component({
if(files.length>0){
let hasNok=false
files.some(f=>{
if(f.pro==100){
hasNok=true
if(f.progress==100){
bill_list.push(f.remote.url)
}else{
hasNok=true
}
})
if(hasNok){
... ... @@ -39,14 +40,32 @@ Component({
}
this.rid=rid
this.bill_list=bill_list
this.hasSubmit=true
this.setData({
hidden:false,
})
},
hide(){
this.setData({
hidden:false,
hidden:true,
})
},
hasSubmit:true,
submit(){
this.hide()
if(!this.hasSubmit) return;
this.hasSubmit=false,
App.Customer.UpdateOrderInfo({
rid:this.rid,
bill_list:JSON.stringify(this.bill_list),
price:this.data.price,
}).then(()=>{
this.triggerEvent('event')
this.hasSubmit=true
}).catch(()=>{
this.triggerEvent('event')
this.hasSubmit=true
})
},
}
})
... ...
... ... @@ -85,11 +85,11 @@ Page({
},
detail:null,
getDetail(){
getDetail(hasCache=false){
App.Reserve.Detail({
openid: getApp().openid,
rid: this.options.rid
}).then(async res => {
},hasCache).then(async res => {
this.detail=this.formatDatail(res.data)
this.detail.ddate_solt=Number(this.detail.ddate_solt);
this.setData({
... ... @@ -160,6 +160,13 @@ Page({
urls:[path],
})
},
displayOrderImages(){
if(this.detail.order_info.bill_list.length>0){
wx.previewImage({
urls:this.detail.order_info.bill_list,
})
}
},
deleteImage(e){
let index=util.attr(e,'index')
let files=this.data.files
... ... @@ -170,6 +177,9 @@ Page({
util.toast('图片已删除','none')
},
submit(){
this.selectComponent('#confirm-price').show()
this.selectComponent('#confirm-price').show(this.options.rid,this.data.files)
},
confirmPriceEvent(){
this.getDetail(true);
},
})
\ No newline at end of file
... ...
... ... @@ -14,7 +14,7 @@
</view>
<view class="item flex-lr" wx:if="{{detail.order_info.bill_list}}">
<view class="item-label">消费清单</view>
<view class="item-value order_info-bill_list">查看消费清单</view>
<view class="item-value order_info-bill_list" bindtap="displayOrderImages">查看消费清单</view>
</view>
<view class="bg-img pay-tips-icon bg-pay{{detail.order_info.status}}"></view>
</view>
... ... @@ -25,11 +25,16 @@
<view class="orderRemark">{{detail.orderRemark}}</view>
</view>
<view class="center">
<view class="item flex-lr">
<view class="item-label">桌位信息</view>
<view class="item-value flex-rr">
【{{util.reserveTidName(detail.tables[0].tid)}}】{{detail.tables[0].name}}
<view class="bg-img bg-x1" wx:if="{{detail.tables.length>1}}"></view>
<view class="item {{tabs?'auto-height':''}}">
<view class="flex-lr" bindtap="{{detail.tables.length>1?'displayTables':''}}">
<view class="item-label">桌位信息</view>
<view class="item-value flex-rr">
<view wx:if="{{!tabs}}">【{{util.reserveTidName(detail.tables[0].tid)}}】{{detail.tables[0].name}}</view>
<view class="bg-img bg-{{tabs?'x2':'x1'}}" wx:if="{{detail.tables.length>1}}"></view>
</view>
</view>
<view class="tabs-view" wx:if="{{tabs}}">
<view class="tabs-item" wx:for="{{tabs}}" wx:key="tabs">【{{util.reserveTidName(index)}}】{{item}}</view>
</view>
</view>
<view class="item flex-lr">
... ... @@ -141,5 +146,5 @@
</view>
</block>
</view>
<view class="submit {{price?'active':''}}">发送给顾客</view>
<confirm-price id="confirm-price" price="{{price}}" rid="{{rid}}" files="{{files}}"></confirm-price>
\ No newline at end of file
<view class="submit {{price?'active':''}}" bindtap="submit">发送给顾客</view>
<confirm-price id="confirm-price" price="{{price}}" bindevent="confirmPriceEvent"></confirm-price>
\ No newline at end of file
... ...
... ... @@ -26,7 +26,7 @@ page{
width: 165px; height: 81px;
background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -10px -10px;
}
.bg-pay1 {
.bg-pay2 {
width: 165px; height: 81px;
background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -195px -10px;
}
... ... @@ -129,7 +129,7 @@ page{
border-bottom: 2rpx solid rgba(238,238,238,1);
padding-top: 0;
}
.orderinput .auto-height{
.orderinput .auto-height,.userinfo .auto-height{
height: auto;
}
.orderinput .item:last-child{
... ... @@ -150,6 +150,15 @@ page{
.tabs-item{
line-height: 44rpx;
}
.userinfo .tabs-view{
font-size:28rpx;
font-family:PingFangSC-Medium,PingFang SC;
font-weight:500;
padding: 24rpx 20rpx 0;
}
.userinfo .tabs-item{
line-height:40rpx;
}
.hasPrice{
position: absolute;
top:0;
... ...
... ... @@ -470,4 +470,8 @@ export default {
'App.PayOnline.CombineTransactions':{
openid:'openid',
},
//商家确认账单操作
'App.Customer.UpdateOrderInfo':{
silence:false,
},
}
\ No newline at end of file
... ...