| | |
| | | <view class="item-qrcode" v-if=" (info.type ===0 && info.status >=1 &&info.status <7) || (info.type ===1 && (info.status ===1 || (info.takeShopId && info.status ===5)))"> |
| | | <!-- <image src="/static/image/btn_upload@2x.png" mode="widthFix"></image> --> |
| | | <text style="font-size: 36rpx;font-weight: 600;margin-bottom: 20rpx;">行李编号:{{info.sortnum || ''}}</text> |
| | | <view style="width: 360rpx; height: 360rpx;"> |
| | | <canvas canvas-id="qrcodeCanvas" id="qrcodeCanvas":style="'width: '+width+'px; height:'+height+'px;'"></canvas> |
| | | <image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image> |
| | | <view class="qrcode-box" style="width: 360rpx; height: 360rpx;"> |
| | | <canvas v-if="!qrcodeImage" canvas-id="qrcodeCanvas" id="qrcodeCanvas" :style="'width: '+width+'px; height:'+height+'px;'+'opacity: 0;'"></canvas> |
| | | <image v-else class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image> |
| | | </view> |
| | | <text>{{info.memberVerifyCode || ''}}</text> |
| | | <text @tap="copyCode(info.memberVerifyCode||'')">核销码</text> |
| | |
| | | <view class="footer-btns"> |
| | | <view class="btn kong" @click="contactPhone(info,0)" v-if="info.status ===1 || info.status==2 || info.status===98">联系门店</view> |
| | | <view class="btn kong" @click="openTrackPopup">订单轨迹</view> |
| | | <view class="btn kong" v-if="[0,1].includes(info.status) && info.abnormalOrder !== 1" @click="cancelOrder(info)">取消订单</view> |
| | | <view class="btn kong" v-if="[0,1].includes(info.status) && info.exceptionStatus !== 1" @click="cancelOrder(info)">取消订单</view> |
| | | <view class="btn kong" @click="deleteOrder(info)" v-if="info.status ===7 || info.status===96 || info.status == 99">删除订单</view> |
| | | <view class="btn you" @click="payOrder(info)" v-if="info.status ===0">立即支付</view> |
| | | <!-- <view class="btn you" v-if="info.status >=1 &&info.status <7 " @click="openQrcode(info)" >核销码</view> |
| | | --> <view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">评价订单</view> |
| | | <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus===3 ">立即支付</view> |
| | | </view> |
| | |
| | | <view class="btn kong" @click="openTrackPopup">订单轨迹</view> |
| | | <view class="btn kong" @click="contactPhone(info,2)" v-if="[3,4,5].includes(info.status) && !info.takeShopId">联系骑手</view> |
| | | <view class="btn kong" @click="contactPhone(info,1)" v-if="info.status ===5 && info.takeShopId">联系门店</view> |
| | | <view class="btn kong" v-if="[0,1,2].includes(info.status)" @click="cancelOrder(info)">取消订单</view> |
| | | <view class="btn kong" v-if="[0].includes(info.status)" @click="cancelOrder(info)">取消订单</view> |
| | | <view class="btn you" @click="payOrder(info)" v-if="info.status ===0">立即支付</view> |
| | | <view class="btn kong" @click="deleteOrder(info)" v-if="info.status ===7 || info.status===96 || info.status == 99">删除订单</view> |
| | | <view class="btn you" @click="cancelOrder(info)" v-if="info.status ===1">申请退款</view> |
| | | <!-- <view class="btn you" v-if="info.status ===1 || (info.takeShopId && info.status ===5)" @click="openQrcode(info)" >核销码</view> |
| | | <view class="btn you" @click="cancelOrder(info)" v-if="info.exceptionStatus === 0 && [1,2].includes(info.status)">申请退款</view> |
| | | --> <view class="btn you" @click="doneOrder(info)" v-if="!info.takeShopId && info.status ===5">确认收货</view> |
| | | <view class="btn you" @click="evaluateOrder(info)" v-if="info.status ===7 && !info.commentStatus ">评价订单</view> |
| | | <view class="btn you" @click="payOrderFee(info)" v-if="info.status ===5 && info.overdueStatus ===3">立即支付</view> |
| | |
| | | :key="track.key + '-' + imgIndex" |
| | | :src="img" |
| | | mode="aspectFill" |
| | | @tap="previewImage(trackList[index].images, imgIndex)" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </u-popup> |
| | | <!-- <u-popup :show="showQrcode" round="15" @close="openQrcode()" :safeAreaInsetBottom="false" mode="bottom" :closeable="true" :closeOnClickOverlay="false"> |
| | | <view class="tc" style="height: 700rpx;width: 100%; "> |
| | | <view class="tc-contemt" style="text-align: center;"> |
| | | <view class="tc-contemt-title" style="text-align: center;">核销码</view> |
| | | <view class="qrcode-box"> |
| | | <canvas canvas-id="qrcodeCanvas1" id="qrcodeCanvas1" style="width: 100px; height: 100px;"></canvas> |
| | | <image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image> |
| | | </view> |
| | | <text class="pickup-code">{{ info.memberVerifyCode||'' }}</text> |
| | | <text class="pickup-tip" @tap="copyCode(info.memberVerifyCode||'')">点击复制自提码</text> |
| | | </view> |
| | | </view> |
| | | </u-popup> --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | this.linkItem={title:'',linkname:'',linkphone:''} |
| | | }, |
| | | methods:{ |
| | | previewImage(images, current) { |
| | | uni.previewImage({ |
| | | urls: images, |
| | | current: current |
| | | }) |
| | | }, |
| | | async openTrackPopup() { |
| | | uni.showLoading({ |
| | | title: '加载中...', |
| | |
| | | } |
| | | }) |
| | | }, |
| | | async openQrcode(){ |
| | | this.qrcodeImage=null |
| | | var that =this |
| | | if(!this.showQrcode){ |
| | | this.showQrcode =true |
| | | drawQrcode({ |
| | | canvasId: 'qrcodeCanvas1', |
| | | text: this.info.memberVerifyCode, |
| | | width: this.rpxToPx(360), |
| | | height: this.rpxToPx(360), |
| | | correctLevel: 2 |
| | | }) |
| | | that.$nextTick(() => { |
| | | uni.canvasToTempFilePath({ |
| | | canvasId: 'qrcodeCanvas', |
| | | success: (res) => { |
| | | that.qrcodeImage = res.tempFilePath |
| | | } |
| | | }, that) |
| | | }) |
| | | }else{ |
| | | this.showQrcode = false |
| | | } |
| | | }, |
| | | async showQrcodeImg(){ |
| | | console.log("showQrcodeImg") |
| | | if((this.info.type ===0 && this.info.status >=1 &&this.info.status <7) |
| | |
| | | } |
| | | this.qrcodeImage=null |
| | | var that =this |
| | | drawQrcode({ |
| | | canvasId: 'qrcodeCanvas', |
| | | text: this.info.memberVerifyCode, |
| | | width: this.rpxToPx(360), |
| | | height: this.rpxToPx(360), |
| | | correctLevel: 2 |
| | | }) |
| | | that.$nextTick(() => { |
| | | uni.canvasToTempFilePath({ |
| | | this.$nextTick(() => { |
| | | drawQrcode({ |
| | | canvasId: 'qrcodeCanvas', |
| | | success: (res) => { |
| | | console.log("showQrcodeImg-------成功",res) |
| | | that.qrcodeImage = res.tempFilePath |
| | | }, |
| | | fail: (err) => { |
| | | console.log("showQrcodeImg-------失败",err) |
| | | } |
| | | }, that) |
| | | text: this.info.memberVerifyCode, |
| | | width: this.rpxToPx(360), |
| | | height: this.rpxToPx(360), |
| | | correctLevel: 2 |
| | | }) |
| | | setTimeout(() => { |
| | | uni.canvasToTempFilePath({ |
| | | canvasId: 'qrcodeCanvas', |
| | | x: 0, |
| | | y: 0, |
| | | width: that.width, |
| | | height: that.height, |
| | | destWidth: that.width, |
| | | destHeight: that.height, |
| | | success: (res) => { |
| | | console.log("showQrcodeImg-------成功",res) |
| | | that.qrcodeImage = res.tempFilePath |
| | | }, |
| | | fail: (err) => { |
| | | console.log("showQrcodeImg-------失败",err) |
| | | // 如果失败,使用 canvas 直接显示 |
| | | that.qrcodeImage = '' |
| | | } |
| | | }, that) |
| | | }, 300) |
| | | }) |
| | | // setTimeout(() => { |
| | | // uni.canvasToTempFilePath({ |
| | | // canvasId: 'qrcodeCanvas', |
| | | // success: (res) => { |
| | | // console.log("showQrcodeImg-------成功",res) |
| | | // that.qrcodeImage = res.tempFilePath |
| | | // }, |
| | | // fail: (err) => { |
| | | // console.log("showQrcodeImg-------失败",err) |
| | | // } |
| | | // }, this) |
| | | // }, 100) |
| | | } |
| | | |
| | | }, |
| | |
| | | width: 360rpx; |
| | | height: 360rpx; |
| | | } |
| | | #qrcodeCanvas { |
| | | position: fixed; |
| | | top: -100%; |
| | | left: -100%; |
| | | opacity: 0; |
| | | .qrcode-box { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | canvas { |
| | | width: 360rpx; |
| | | height: 360rpx; |
| | | } |
| | | } |
| | | text { |
| | | &:nth-child(2) { |