| | |
| | | <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" @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))">去支付</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.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.releaseMemberId && (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="show4 =true" v-if="userInfo.id !== info.releaseMemberId && (info.status ===1)">抢单</view> |
| | |
| | | <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> |
| | | |
| | |
| | | id: null, |
| | | loading:false, |
| | | commentInfo:'', |
| | | info: {}, |
| | | 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} |
| | |
| | | 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; |