| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));"></view> |
| | | <view class="order-footer"> |
| | | <view style="width: 100%; height: calc(108rpx + env(safe-area-inset-bottom));" v-if="![99].includes(info.status)"></view> |
| | | <view class="order-footer" v-if="![99].includes(info.status)"> |
| | | <view class="order-footer-btn"> |
| | | <view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.acceptMemberId && info.status ===2">取消订单</view> |
| | | <view class="order-footer-btn-a" @click="show = true" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">取消订单</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===4 && info.commentStatus!=1)">去评价</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))">去支付</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)">修改订单</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.isUpdate==1 && info.status ===2)">修改确认</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id !== info.releaseMemberId && (info.status ===1)">抢单</view> |
| | | <view class="order-footer-btn-b" @click="show2=true" v-if="userInfo.id === info.releaseMemberId && (info.status ===4 && info.commentStatus!=1)">去评价</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId &&((info.status ===3 && info.type !==2)|| (info.status ===0 && info.type===2))" @click="show1 = true">去支付</view> |
| | | <view class="order-footer-btn-b" v-if="userInfo.id === info.releaseMemberId && (info.status ===0 || info.status ===1|| info.status ===2)" @click="jumpEdit()">修改订单</view> |
| | | <view class="order-footer-btn-b" @click="show5 =true" v-if="userInfo.id === info.acceptMemberId && (info.isUpdate==1 && info.status ===2)">修改确认</view> |
| | | <view class="order-footer-btn-b" @click="show3 =true" v-if="userInfo.id === info.releaseMemberId && (info.status ===2)">开始作业</view> |
| | | <view class="order-footer-btn-b" @click="show6 =true" v-if="userInfo.id !== info.releaseMemberId && (info.status ===1)">抢单</view> |
| | | </view> |
| | | <view style="width: 100%; height: env(safe-area-inset-bottom);"></view> |
| | | </view> |
| | |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show = false">我再想想</view> |
| | | <view class="btn2" @click="show = false">确认取消</view> |
| | | <view class="btn2" @click="cancelDo">确认取消</view> |
| | | </view> |
| | | </u-modal> |
| | | |
| | | <u-modal |
| | | title="温馨提示" |
| | | :show="show4" |
| | | closeOnClickOverlay |
| | | showCancelButton |
| | | > |
| | | <view class="slot-content"> |
| | | 确认取消订单吗? |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show = false">我再想想</view> |
| | | <view class="btn2" @click="cancelDo">确认取消</view> |
| | | </view> |
| | | </u-modal> |
| | | <u-modal |
| | | title="温馨提示" |
| | | :show="show6" |
| | | closeOnClickOverlay |
| | | showCancelButton |
| | | > |
| | | <view class="slot-content"> |
| | | 确认抢单吗? |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show6 = false">我再想想</view> |
| | | <view class="btn2" @click="acceptDo">确认接单</view> |
| | | </view> |
| | | </u-modal> |
| | | <u-modal |
| | | title="温馨提示" |
| | | :show="show5" |
| | | closeOnClickOverlay |
| | | showCancelButton |
| | | > |
| | | <view class="slot-content"> |
| | | 是否同意订单修改内容? |
| | | </view> |
| | | <view slot="confirmButton" style="display: flex; justify-content: space-between; align-items: center; width: 100%;"> |
| | | <view class="btn1" @click="show5=false">我再想想</view> |
| | | <view style="width: 20rpx; height: 100%;"></view> |
| | | <view class="btn2" style="background-color: #f56c6c; color: #ffffff;" @click="confirmUpdDo(1)">不同意</view> |
| | | <view style="width: 20rpx; height: 100%;"></view> |
| | | <view class="btn2" @click="confirmUpdDo(0)">同意</view> |
| | | </view> |
| | | </u-modal> |
| | | <!-- 支付弹窗 --> |
| | | <u-popup :show="show1" round="15" mode="bottom"> |
| | | <view class="zhifu"> |
| | |
| | | <image @click="show1 = false" src="/static/icon/ic_close@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="zhifu-c"> |
| | | <view class="zhifu-c-info"> |
| | | 请确认金额并支付费用给 <text>莲花劳务公司</text> |
| | | <view class="zhifu-c-info" v-if="info.type !== 2"> |
| | | 请确认金额并支付费用给 <text>{{info.acceptName}}</text> |
| | | </view> |
| | | <view class="zhifu-c-info1">支付金额:</view> |
| | | <view class="zhifu-c-input"> |
| | | <image src="/static/icon/¥@2x.png" mode="widthFix"></image> |
| | | <input type="number" placeholder="请输入" /> |
| | | <input type="number" v-model="amount" :disabled="info.type === 2" placeholder="请输入" /> |
| | | </view> |
| | | </view> |
| | | <view class="zhifu-botton">确认支付</view> |
| | | <view class="zhifu-botton" @click="payment">确认支付</view> |
| | | </view> |
| | | </u-popup> |
| | | |
| | |
| | | <view class="zhifu-pj"> |
| | | <view class="zhifu-pj-label">服务评价</view> |
| | | <view class="zhifu-pj-val"> |
| | | <u-rate :count="count" activeColor="#FFC331" size="26" v-model="value"></u-rate> |
| | | <u-rate :count="count" activeColor="#FFC331" size="26" v-model="value" @click=""></u-rate> |
| | | </view> |
| | | </view> |
| | | <view class="zhifu-textarea"> |
| | | <image src="/static/icon/ic_pingjia@2x.png" mode="widthFix"></image> |
| | | <u--textarea placeholder="请说说您对本次交易的感受" border="none" count></u--textarea> |
| | | <u--textarea placeholder="请说说您对本次交易的感受" border="none" v-model="commentInfo" count></u--textarea> |
| | | </view> |
| | | <view class="zhifu-botton" style="margin-top: 60rpx;">立即评价</view> |
| | | <view class="zhifu-botton" style="margin-top: 60rpx;" @click="commentDo">立即评价</view> |
| | | </view> |
| | | </u-popup> |
| | | </view> |
| | |
| | | show1: false, |
| | | show2: false, |
| | | count: 5, |
| | | show3:false, |
| | | show4:false, |
| | | show5:false, |
| | | show6:false, |
| | | value:0, |
| | | wayList:[], |
| | | bgImg: require('@/static/image/bg_green@2x.png'), |
| | | id: null, |
| | | loading:false, |
| | | commentInfo:'', |
| | | info: {}, |
| | | amount: '' |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | this.getOrderData() |
| | | }, |
| | | methods:{ |
| | | // 修改 |
| | | jumpEdit() { |
| | | if (this.info.type === 0 && this.info.workType === 0) { |
| | | uni.navigateTo({ |
| | | url: `/pages/using-workers/using-workers?id=${this.info.id}` |
| | | }) |
| | | } else if (this.info.type === 0 && this.info.workType === 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/sorting/sorting?id=${this.info.id}` |
| | | }) |
| | | } else if (this.info.type === 0 && this.info.workType === 2) { |
| | | uni.navigateTo({ |
| | | url: `/pages/packaging-worker/packaging-worker?id=${this.info.id}` |
| | | }) |
| | | } else if (this.info.type === 1) { |
| | | uni.navigateTo({ |
| | | url: `/pages/freight/freight?id=${this.info.id}` |
| | | }) |
| | | } |
| | | }, |
| | | payment() { |
| | | var that = this |
| | | // 订餐 |
| | | if (this.info.type === 2) { |
| | | this.$u.api.reusePay({ |
| | | orderId: this.info.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | wx.requestPayment({ |
| | | timeStamp: res.data.object.timeStamp, |
| | | nonceStr: res.data.object.nonceStr, |
| | | package: res.data.object.packageVal, |
| | | signType: res.data.object.signType, |
| | | paySign: res.data.object.paySign, |
| | | success (res1) { |
| | | if (res1.errMsg = 'requestPayment:ok') { |
| | | that.show1 = false |
| | | uni.showToast({ title: '支付成功', icon: 'success', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.$u.api.doneOrder({ |
| | | orderId: this.info.id, |
| | | amount: Number(this.amount) * 100 |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | wx.requestPayment({ |
| | | timeStamp: res.data.object.timeStamp, |
| | | nonceStr: res.data.object.nonceStr, |
| | | package: res.data.object.packageVal, |
| | | signType: res.data.object.signType, |
| | | paySign: res.data.object.paySign, |
| | | success (res1) { |
| | | if (res1.errMsg = 'requestPayment:ok') { |
| | | that.show1 = false |
| | | uni.showToast({ title: '支付成功', icon: 'success', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }, |
| | | fail(err) { |
| | | console.log(err) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | commentDo(){ |
| | | var that = this |
| | | var param = { info: that.commentInfo,level:that.value||0,orderId: this.id} |
| | | this.$u.api.comment(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show2=false |
| | | uni.showToast({ title: '评价成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }) |
| | | }, |
| | | beginDo(){ |
| | | var that = this |
| | | var param = {orderId: this.id} |
| | | this.$u.api.begin(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show3=false |
| | | uni.showToast({ title: '操作成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }) |
| | | }, |
| | | confirmUpdDo(status){ |
| | | var that = this |
| | | var param = {orderId: this.id,status:status} |
| | | this.$u.api.confirmUpd(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show5=false |
| | | uni.showToast({ title: '确认成功', icon: 'error', duration: 2000 }); |
| | | if(status==1){ |
| | | uni.navigateBack({ delta: 1 }) |
| | | }else{ |
| | | that.getOrderData() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | acceptDo(){ |
| | | var that = this |
| | | var param = {orderId: this.id} |
| | | this.$u.api.accept(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show6=false |
| | | uni.showToast({ title: '抢单成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | } |
| | | }) |
| | | }, |
| | | cancelDo(){ |
| | | var that = this |
| | | var param ={ orderId:that.id} |
| | | this.$u.api.cancelOrder(param).then(res =>{ |
| | | if(res.code ===200){ |
| | | that.show=false |
| | | uni.showToast({ title: '订单取消成功', icon: 'error', duration: 2000 }); |
| | | that.getOrderData() |
| | | if(that.userInfo.id !== that.info.releaseMemberId){ |
| | | uni.navigateBack({ delta: 1 }) |
| | | }else{ |
| | | that.getOrderData() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | previemImg(src){ |
| | | uni.previewImage({ |
| | | current: src, // 当前显示图片的http链接 |
| | |
| | | if(res.code ===200){ |
| | | if(that.userInfo.id === res.data.releaseMemberId || that.userInfo.id === res.data.acceptMemberId ){ |
| | | that.info = res.data |
| | | that.amount = ((that.info.estimatedAccount || 0) / 100).toFixed(2) |
| | | if(that.info.wayInfo){ |
| | | that.wayList = JSON.parse(that.info.wayInfo) |
| | | } |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | .order-footer-btn-a { |
| | | width: 334rpx; |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |
| | |
| | | border: 1rpx solid #B2B2B2; |
| | | } |
| | | .order-footer-btn-b { |
| | | width: 334rpx; |
| | | flex: 1; |
| | | height: 88rpx; |
| | | line-height: 88rpx; |
| | | text-align: center; |