|
@@ -20,7 +20,7 @@
|
|
|
|
|
|
<!-- 表单 -->
|
|
|
<view v-if="!isHasOrder">
|
|
|
- <view class="list-container">
|
|
|
+ <view class="list-container" v-if="!isBindRider">
|
|
|
<view class="list-item">
|
|
|
<view class="list-item-left phone flex align_center">
|
|
|
<text>联系电话</text>
|
|
@@ -50,9 +50,9 @@
|
|
|
</view>
|
|
|
<!-- 一键预约 -->
|
|
|
<view class="flex flex_column justify_center align_center yuyueBtn">
|
|
|
- <view v-if="!isHasRider.haveBindRider && !isHasRider.haveTempRider" class="title">暂无可上门骑手,不能下单</view>
|
|
|
- <view class="haveRiderStyle" @click="submit" v-if="isHasRider.haveBindRider || isHasRider.haveTempRider">一键预约</view>
|
|
|
- <view class="noRiderStyle" v-if="!isHasRider.haveBindRider && !isHasRider.haveTempRider">一键预约</view>
|
|
|
+ <view v-if="isBindRider && isHasRider" class="title">暂无可上门骑手,不能下单</view>
|
|
|
+ <view class="haveRiderStyle" @click="submit" v-if="!isBindRider || !isHasRider">一键预约</view>
|
|
|
+ <view class="noRiderStyle" v-if="isBindRider && isHasRider">一键预约</view>
|
|
|
<!-- <u-button :custom-style="yuYueBtn" :hair-line="false" >一键预约</u-button> -->
|
|
|
</view>
|
|
|
|
|
@@ -119,7 +119,7 @@
|
|
|
<u-image src="/static/index/def_home_shop.png" width="172" height="172" ></u-image>
|
|
|
</view> -->
|
|
|
<view class="result">
|
|
|
- 您于<text>{{createDate|| ''}}</text>下单成功, 点击<text style="color:#1995FF" @click="checkOrderDetail">查看详情</text>
|
|
|
+ 您于<text>{{orderCreateTime|| '--'}}</text>下单成功, 点击<text style="color:#1995FF" @click="checkOrderDetail">查看详情</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content-footer" @itemChange="chooseReason">
|
|
@@ -175,10 +175,12 @@
|
|
|
statusBarHeight:20,
|
|
|
toBarHeight:44,
|
|
|
pageInfo:null,
|
|
|
- isHasRider:null ,// 是否有绑定的骑手或3公里有可分配的骑手
|
|
|
+ isHasRider:false ,// 是否有绑定的骑手或3公里有可分配的骑手
|
|
|
+ isBindRider:false,
|
|
|
isHasOrder:false,
|
|
|
- // orderCreateTime:'',
|
|
|
- // orderId:''
|
|
|
+ sourceTypeReserve:'',
|
|
|
+ orderCreateTime:'',
|
|
|
+ orderId:''
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -213,12 +215,12 @@
|
|
|
mobile(){
|
|
|
return this.$store.state.vuex_userInfoData.contactMobile
|
|
|
},
|
|
|
- orderId(){
|
|
|
- return this.$store.state.vuex_orderInfo.id
|
|
|
- },
|
|
|
- createDate(){
|
|
|
- return this.$store.state.vuex_orderInfo.createDate
|
|
|
- }
|
|
|
+ // orderId(){
|
|
|
+ // return this.$store.state.vuex_orderInfo.id
|
|
|
+ // },
|
|
|
+ // createDate(){
|
|
|
+ // return this.$store.state.vuex_orderInfo.createDate
|
|
|
+ // }
|
|
|
},
|
|
|
methods:{
|
|
|
pageInit() {
|
|
@@ -232,7 +234,9 @@
|
|
|
getOrderNum(){
|
|
|
hasOrder().then(res=>{
|
|
|
if(res.status==200){
|
|
|
- this.isHasOrder=res.data>0
|
|
|
+ this.isHasOrder=res.data.unfinishedNum>0
|
|
|
+ this.orderId=res.data.id || ''
|
|
|
+ this.orderCreateTime=res.data.createDate || ''
|
|
|
}else{
|
|
|
uni.showToast({
|
|
|
title: res.message,
|
|
@@ -277,7 +281,8 @@
|
|
|
searchRider().then(res=>{
|
|
|
console.log(res,'==================')
|
|
|
if(res.status==200){
|
|
|
- this.isHasRider=res.data
|
|
|
+ this.isBindRider=res.data.haveBindRider
|
|
|
+ this.isHasRider=res.data.haveTempRider
|
|
|
}else{
|
|
|
uni.showToast({
|
|
|
title:res.message,
|
|
@@ -307,6 +312,7 @@
|
|
|
this.pageInfo=res.data
|
|
|
this.form.mobile=res.data.mobile
|
|
|
this.reverseReceiveAddress=Object.assign(this.reverseReceiveAddress,res.data.reverseReceiveAddress||{})
|
|
|
+ this.sourceTypeReserve=res.data.sourceTypeReserve
|
|
|
}else{
|
|
|
uni.showToast({
|
|
|
title:res.message,
|
|
@@ -447,9 +453,9 @@
|
|
|
orderInfoSave(params).then(res=>{
|
|
|
if(res.status==200){
|
|
|
this.getOrderNum()
|
|
|
- this.$store.state.vuex_orderInfo=res.data
|
|
|
+ // this.$store.state.vuex_orderInfo=res.data
|
|
|
// this.$u.vuex('vuex_orderInfo',res.data)
|
|
|
- console.log(this.$store.state.vuex_orderInfo,'===============时间id')
|
|
|
+ // console.log(this.$store.state.vuex_orderInfo,'===============时间id')
|
|
|
// this.orderId=res.data?res.data.id:''
|
|
|
// this.orderCreateTime=res.data? res.data.createDate:""
|
|
|
// setTimeout(()=>{
|