| | |
| | | </view> |
| | | </view> |
| | | <view class="index-j-list"> |
| | | <view class="index-list-item" v-if="orderList" v-for="(item, index) in orderList" :key="index"> |
| | | <view class="index-list-item" v-if="orderList && orderList.length" v-for="(item, index) in orderList" :key="index"> |
| | | <view class="index-list-item-head"> |
| | | <view class="index-list-item-head-l"> |
| | | <view class="xoam"></view> |
| | | <text v-if="item.type === 0 && item.workType === 0">用工单 - 采摘工</text> |
| | | <text v-else-if="item.type === 0 && item.workType === 1">用工单 - 分拣工</text> |
| | | <text v-else-if="item.type === 0 && item.workType === 2">用工单 - 包装工</text> |
| | | |
| | | <text v-else-if="item.type === 1">运货单-{{item.categoryName}}-{{item.carUnit}}</text> |
| | | |
| | | <text v-else-if="item.type === 1">运货单-{{item.categoryName}}</text> |
| | | <text v-else-if="item.type === 2">订餐单</text> |
| | | </view> |
| | | <view class="index-list-item-head-r">距离 {{item.distance}}km</view> |
| | | <view class="index-list-item-head-r">{{item.distance}}km</view> |
| | | </view> |
| | | <view class="index-list-item-info" v-if="item.type === 0 && item.workType === 0"> |
| | | {{item.categoryName}}|{{item.priceNum1}}斤 |
| | |
| | | {{item.categoryName}}|{{item.priceNum1}}人 |
| | | </view> |
| | | <view class="index-list-item-info" v-if="item.type === 1"> |
| | | {{item.transportTypeName}} | {{item.transportNum}}{{item.transportUnit}}|用车{{item.priceNum1}}天 |
| | | {{item.carUnit}} | {{item.transportTypeName}} | {{item.transportNum}}{{item.transportUnit}}|用车{{item.priceNum1}}天 |
| | | </view> |
| | | <view class="index-list-item-info" v-if="item.type === 2"> |
| | | {{item.wayInfoCopy}} |
| | |
| | | <view class="eidt-btn" @click="show1 = true, orderId = item.id">抢单</view> |
| | | </view> |
| | | </view> |
| | | <view v-if="orderList && orderList.length&& !next" class="more">已加载全部</view> |
| | | <view v-if="(!orderList || !orderList.length)&& !next" class="more">暂无订单哦</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="btn2" @click="getaccept1">确认</view> |
| | | </view> |
| | | </u-modal> |
| | | <u-modal |
| | | title="支付未成功" |
| | | :show="show2" |
| | | 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="show2 = false;payOrderId=null">取消支付</view> |
| | | <view class="btn2" @click="goOrderDetail(payOrderId)">查看订单</view> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | |
| | | isOnce: true, |
| | | show1: false, |
| | | orderId: null |
| | | show2: false, |
| | | orderId: null, |
| | | payOrderId:null |
| | | } |
| | | }, |
| | | async onLoad() { |
| | |
| | | this.isLogin = false |
| | | console.log('未登陆') |
| | | } |
| | | this.payOrderId=null |
| | | }, |
| | | watch: { |
| | | typeId: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | goOrderDetail(id){ |
| | | uni.navigateTo({ |
| | | url: `/pages/order-details/order-details?id=`+id |
| | | }) |
| | | this.orderId=null |
| | | this.payOrderId=null |
| | | this.show2=false |
| | | }, |
| | | clearFormParam(){ |
| | | this.form.startDate = '' |
| | | this.form.address = '' |
| | |
| | | that.next = true |
| | | that.orderList = [] |
| | | that.getOrderList() |
| | | that.goOrderDetail(that.orderId) |
| | | }, 2000) |
| | | } |
| | | }) |
| | |
| | | // 提交订单 |
| | | submit() { |
| | | var that = this |
| | | this.payOrderId=null |
| | | if (!this.form.startDate) { |
| | | return uni.showToast({ title: '请选择用餐时间', icon: 'none' }) |
| | | } |
| | |
| | | } |
| | | }, |
| | | fail(err) { |
| | | that.payOrderId = res.data.id |
| | | that.show2=true |
| | | console.log(err) |
| | | } |
| | | }) |
| | |
| | | width: 100%; |
| | | padding: 24rpx 30rpx; |
| | | box-sizing: border-box; |
| | | .more{ |
| | | width: 100%; |
| | | margin-top: 40rpx; |
| | | text-align: center; |
| | | font-size: 24rpx; |
| | | color: #666666; |
| | | } |
| | | .index-list-item { |
| | | width: 100%; |
| | | padding: 30rpx; |