| | |
| | | <template> |
| | | <view class="box"> |
| | | <view class="title">核销订单</view> |
| | | <view class="title">核销订单 |
| | | <text v-if="info.orderStatus ==0" class="status status-b">待支付</text> |
| | | <text v-if="info.orderStatus ==1"class="status status-a" >{{info.receiveType==1?'待自提':'待发货'}}</text> |
| | | <text v-if="info.orderStatus ==2" class="status status-b">待收货</text> |
| | | <text v-if="info.orderStatus ==3" class="status status-b" >交易完成</text> |
| | | <text v-if="info.orderStatus ==4" class="status status-b">已取消</text> |
| | | <text v-if="info.orderStatus ==6"class="status status-b" >已退款</text> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="item-user"> |
| | | <view class="item-user-image"> |
| | | <image src="/static/logo.png" mode="widthFix"></image> |
| | | <image :src="info.member && info.member.imgFullUrl? info.member.imgFullUrl:'/static/icon/default.png'" mode="widthFix"></image> |
| | | </view> |
| | | <view class="item-user-info"> |
| | | <text>张海涛</text> |
| | | <text>18155665556</text> |
| | | <text>{{info.linkName || ''}}</text> |
| | | <text>{{info.linkPhone || ''}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="item-info">订单备注:11月22日来拿</view> |
| | | <view class="item-info">订单备注:{{info.memberInfo || ''}}</view> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="item-title">商品列表</view> |
| | | <view class="row"> |
| | | <view class="row-image"> |
| | | <image src="/static/logo.png" mode="widthFix"></image> |
| | | <template v-if="info.goodsorderDetailList && info.goodsorderDetailList.length"> |
| | | <view class="row" v-for="(item, index) in info.goodsorderDetailList" :key="index" > |
| | | <view class="row-image"> |
| | | <image :src="item.imgurl?item.imgurl:'/static/icon/default2.png'" mode="widthFix"></image> |
| | | </view> |
| | | <view class="row-info"> |
| | | {{info.name || ''}} |
| | | </view> |
| | | <view class="row-price"> |
| | | <text¥{{(info.price || 0).toFixed(2)}}</text> |
| | | <text>x{{info.goodsNum || 1}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="row-info"> |
| | | 中联艾禾宽齿 适用雷沃/中联/久保田 |
| | | </view> |
| | | <view class="row-price"> |
| | | <text>¥499.00</text> |
| | | <text>x1</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </view> |
| | | <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 108rpx);"></view> |
| | | <view class="button">确认核销</view> |
| | | <view class="button" @click="confirm" v-if="info.orderStatus==1 && info.receiveType ==1">确认核销</view> |
| | | |
| | | <u-popup :show="show" round="15" :safeAreaInsetBottom="false" mode="center"> |
| | | <view class="tc"> |
| | | <view class="tc-contemt"> |
| | | <view class="tc-contemt-title">操作提醒</view> |
| | | <view class="tc-contemt-nr"> |
| | | 您确认核销该订单吗? |
| | | </view> |
| | | </view> |
| | | <view class="tc-btn"> |
| | | <view class="tc-btn-item" @click="show = false; ">我再想想</view> |
| | | <view class="tc-btn-item" style="color: #004096;" @click="confirmDo">确认核销</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <u-popup :show="show1" round="15" :safeAreaInsetBottom="false" mode="center"> |
| | | <view class="tc"> |
| | | <view class="tc-contemt"> |
| | | <view class="tc-contemt-title">操作结果</view> |
| | | <view class="tc-contemt-nr"> |
| | | 核销成功,是否继续核销其他订单? |
| | | </view> |
| | | </view> |
| | | <view class="tc-btn"> |
| | | <view class="tc-btn-item" @click="jumpBack ">返回</view> |
| | | <view class="tc-btn-item" style="color: #004096;" @click="jumpWriteoff()">继续核销</view> |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import QRCode from 'qrcode'; |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['navHeight', 'statusbarHeight','shopInfo', 'shopToken']) |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | show:false, |
| | | show1:false, |
| | | shop:{}, |
| | | id:null, |
| | | info:{} |
| | | }; |
| | | }, |
| | | onShow() { |
| | | this.show1 =false |
| | | this.show =false |
| | | this.info={} |
| | | this.shop ={} |
| | | this.checkShopLogin() |
| | | this.shop = this.shopInfo || {} |
| | | this.getShopDetail() |
| | | }, |
| | | onLoad(options) { |
| | | this.id = options.id |
| | | }, |
| | | methods:{ |
| | | async confirmDo(){ |
| | | this.show = !this.show |
| | | var that =this |
| | | var that =this |
| | | let res = await that.$u.api.writeOffOrder({ orderId: this.info.orderId }); |
| | | if (res.code === 200 ) { |
| | | this.info.orderStatus = 3 |
| | | this.show = false |
| | | this.show1 = true |
| | | uni.$emit('updateOrder',{info:this.info,delete:0}) |
| | | }else{ |
| | | } |
| | | }, |
| | | jumpWriteoff(){ |
| | | uni.navigateTo({ |
| | | url: '/pagesA/pages/write-off/write-off' |
| | | }) |
| | | }, |
| | | jumpBack(){ |
| | | uni.navigateBack({delta:1}) |
| | | }, |
| | | confirm(){ |
| | | this.show = !this.show |
| | | }, |
| | | async getShopDetail(){ |
| | | var that =this |
| | | let res = await that.$u.api.shopOrderDetail({orderId:this.id,tokenType:1 }) |
| | | if (res.code === 200) { |
| | | this.info = res.data |
| | | } |
| | | }, |
| | | checkShopLogin(){ |
| | | var that =this |
| | | if( this.shopInfo ==null || this.shopInfo.id==null || this.shopToken==null || this.shopToken==''){ |
| | | uni.navigateTo({ |
| | | url: '/pages/login/login' |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #111111; |
| | | .status{ |
| | | padding: 0 6rpx; |
| | | height: 40rpx; |
| | | line-height: 40rpx; |
| | | border-radius: 8rpx; |
| | | font-weight: 400; |
| | | font-size: 22rpx; |
| | | color: #FFFFFF; |
| | | margin-right: 16rpx; |
| | | } |
| | | .status-a { |
| | | background: #00B775; |
| | | border: 1rpx solid #00B775; |
| | | } |
| | | .status-b { |
| | | background: #666666; |
| | | border: 1rpx solid #004096; |
| | | } |
| | | } |
| | | .item { |
| | | width: 100%; |