Commit 74d727f15d1ca58a6d79fba6d36af6a53d68c914

Authored by vking
1 parent 993f75f9

seller-do

@@ -6,7 +6,7 @@ Component({ @@ -6,7 +6,7 @@ Component({
6 * 组件的属性列表 6 * 组件的属性列表
7 */ 7 */
8 properties: { 8 properties: {
9 - 9 + price:Number,
10 }, 10 },
11 11
12 /** 12 /**
@@ -28,9 +28,10 @@ Component({ @@ -28,9 +28,10 @@ Component({
28 if(files.length>0){ 28 if(files.length>0){
29 let hasNok=false 29 let hasNok=false
30 files.some(f=>{ 30 files.some(f=>{
31 - if(f.pro==100){  
32 - hasNok=true 31 + if(f.progress==100){
33 bill_list.push(f.remote.url) 32 bill_list.push(f.remote.url)
  33 + }else{
  34 + hasNok=true
34 } 35 }
35 }) 36 })
36 if(hasNok){ 37 if(hasNok){
@@ -39,14 +40,32 @@ Component({ @@ -39,14 +40,32 @@ Component({
39 } 40 }
40 this.rid=rid 41 this.rid=rid
41 this.bill_list=bill_list 42 this.bill_list=bill_list
  43 + this.hasSubmit=true
  44 + this.setData({
  45 + hidden:false,
  46 + })
42 }, 47 },
43 hide(){ 48 hide(){
44 this.setData({ 49 this.setData({
45 - hidden:false, 50 + hidden:true,
46 }) 51 })
47 }, 52 },
  53 + hasSubmit:true,
48 submit(){ 54 submit(){
49 this.hide() 55 this.hide()
  56 + if(!this.hasSubmit) return;
  57 + this.hasSubmit=false,
  58 + App.Customer.UpdateOrderInfo({
  59 + rid:this.rid,
  60 + bill_list:JSON.stringify(this.bill_list),
  61 + price:this.data.price,
  62 + }).then(()=>{
  63 + this.triggerEvent('event')
  64 + this.hasSubmit=true
  65 + }).catch(()=>{
  66 + this.triggerEvent('event')
  67 + this.hasSubmit=true
  68 + })
50 }, 69 },
51 } 70 }
52 }) 71 })
@@ -85,11 +85,11 @@ Page({ @@ -85,11 +85,11 @@ Page({
85 85
86 }, 86 },
87 detail:null, 87 detail:null,
88 - getDetail(){ 88 + getDetail(hasCache=false){
89 App.Reserve.Detail({ 89 App.Reserve.Detail({
90 openid: getApp().openid, 90 openid: getApp().openid,
91 rid: this.options.rid 91 rid: this.options.rid
92 - }).then(async res => { 92 + },hasCache).then(async res => {
93 this.detail=this.formatDatail(res.data) 93 this.detail=this.formatDatail(res.data)
94 this.detail.ddate_solt=Number(this.detail.ddate_solt); 94 this.detail.ddate_solt=Number(this.detail.ddate_solt);
95 this.setData({ 95 this.setData({
@@ -160,6 +160,13 @@ Page({ @@ -160,6 +160,13 @@ Page({
160 urls:[path], 160 urls:[path],
161 }) 161 })
162 }, 162 },
  163 + displayOrderImages(){
  164 + if(this.detail.order_info.bill_list.length>0){
  165 + wx.previewImage({
  166 + urls:this.detail.order_info.bill_list,
  167 + })
  168 + }
  169 + },
163 deleteImage(e){ 170 deleteImage(e){
164 let index=util.attr(e,'index') 171 let index=util.attr(e,'index')
165 let files=this.data.files 172 let files=this.data.files
@@ -170,6 +177,9 @@ Page({ @@ -170,6 +177,9 @@ Page({
170 util.toast('图片已删除','none') 177 util.toast('图片已删除','none')
171 }, 178 },
172 submit(){ 179 submit(){
173 - this.selectComponent('#confirm-price').show() 180 + this.selectComponent('#confirm-price').show(this.options.rid,this.data.files)
  181 + },
  182 + confirmPriceEvent(){
  183 + this.getDetail(true);
174 }, 184 },
175 }) 185 })
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </view> 14 </view>
15 <view class="item flex-lr" wx:if="{{detail.order_info.bill_list}}"> 15 <view class="item flex-lr" wx:if="{{detail.order_info.bill_list}}">
16 <view class="item-label">消费清单</view> 16 <view class="item-label">消费清单</view>
17 - <view class="item-value order_info-bill_list">查看消费清单</view> 17 + <view class="item-value order_info-bill_list" bindtap="displayOrderImages">查看消费清单</view>
18 </view> 18 </view>
19 <view class="bg-img pay-tips-icon bg-pay{{detail.order_info.status}}"></view> 19 <view class="bg-img pay-tips-icon bg-pay{{detail.order_info.status}}"></view>
20 </view> 20 </view>
@@ -25,11 +25,16 @@ @@ -25,11 +25,16 @@
25 <view class="orderRemark">{{detail.orderRemark}}</view> 25 <view class="orderRemark">{{detail.orderRemark}}</view>
26 </view> 26 </view>
27 <view class="center"> 27 <view class="center">
28 - <view class="item flex-lr">  
29 - <view class="item-label">桌位信息</view>  
30 - <view class="item-value flex-rr">  
31 - 【{{util.reserveTidName(detail.tables[0].tid)}}】{{detail.tables[0].name}}  
32 - <view class="bg-img bg-x1" wx:if="{{detail.tables.length>1}}"></view> 28 + <view class="item {{tabs?'auto-height':''}}">
  29 + <view class="flex-lr" bindtap="{{detail.tables.length>1?'displayTables':''}}">
  30 + <view class="item-label">桌位信息</view>
  31 + <view class="item-value flex-rr">
  32 + <view wx:if="{{!tabs}}">【{{util.reserveTidName(detail.tables[0].tid)}}】{{detail.tables[0].name}}</view>
  33 + <view class="bg-img bg-{{tabs?'x2':'x1'}}" wx:if="{{detail.tables.length>1}}"></view>
  34 + </view>
  35 + </view>
  36 + <view class="tabs-view" wx:if="{{tabs}}">
  37 + <view class="tabs-item" wx:for="{{tabs}}" wx:key="tabs">【{{util.reserveTidName(index)}}】{{item}}</view>
33 </view> 38 </view>
34 </view> 39 </view>
35 <view class="item flex-lr"> 40 <view class="item flex-lr">
@@ -141,5 +146,5 @@ @@ -141,5 +146,5 @@
141 </view> 146 </view>
142 </block> 147 </block>
143 </view> 148 </view>
144 -<view class="submit {{price?'active':''}}">发送给顾客</view>  
145 -<confirm-price id="confirm-price" price="{{price}}" rid="{{rid}}" files="{{files}}"></confirm-price>  
  149 +<view class="submit {{price?'active':''}}" bindtap="submit">发送给顾客</view>
  150 +<confirm-price id="confirm-price" price="{{price}}" bindevent="confirmPriceEvent"></confirm-price>
@@ -26,7 +26,7 @@ page{ @@ -26,7 +26,7 @@ page{
26 width: 165px; height: 81px; 26 width: 165px; height: 81px;
27 background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -10px -10px; 27 background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -10px -10px;
28 } 28 }
29 -.bg-pay1 { 29 +.bg-pay2 {
30 width: 165px; height: 81px; 30 width: 165px; height: 81px;
31 background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -195px -10px; 31 background: url('http://nosqn.colorcun.com/checkout/images/css_sprites.png') -195px -10px;
32 } 32 }
@@ -129,7 +129,7 @@ page{ @@ -129,7 +129,7 @@ page{
129 border-bottom: 2rpx solid rgba(238,238,238,1); 129 border-bottom: 2rpx solid rgba(238,238,238,1);
130 padding-top: 0; 130 padding-top: 0;
131 } 131 }
132 -.orderinput .auto-height{ 132 +.orderinput .auto-height,.userinfo .auto-height{
133 height: auto; 133 height: auto;
134 } 134 }
135 .orderinput .item:last-child{ 135 .orderinput .item:last-child{
@@ -150,6 +150,15 @@ page{ @@ -150,6 +150,15 @@ page{
150 .tabs-item{ 150 .tabs-item{
151 line-height: 44rpx; 151 line-height: 44rpx;
152 } 152 }
  153 +.userinfo .tabs-view{
  154 + font-size:28rpx;
  155 + font-family:PingFangSC-Medium,PingFang SC;
  156 + font-weight:500;
  157 + padding: 24rpx 20rpx 0;
  158 +}
  159 +.userinfo .tabs-item{
  160 + line-height:40rpx;
  161 +}
153 .hasPrice{ 162 .hasPrice{
154 position: absolute; 163 position: absolute;
155 top:0; 164 top:0;
@@ -470,4 +470,8 @@ export default { @@ -470,4 +470,8 @@ export default {
470 'App.PayOnline.CombineTransactions':{ 470 'App.PayOnline.CombineTransactions':{
471 openid:'openid', 471 openid:'openid',
472 }, 472 },
  473 + //商家确认账单操作
  474 + 'App.Customer.UpdateOrderInfo':{
  475 + silence:false,
  476 + },
473 } 477 }