|
|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
+ <view>
|
|
|
<u-navbar :is-back="false" :title="tit">
|
|
|
<view class="slot">
|
|
|
<!-- 我的 -->
|
|
|
@@ -302,7 +303,7 @@
|
|
|
<view class="three_right" v-else>¥ 0</view>
|
|
|
</view>
|
|
|
<view class="part4">
|
|
|
- <view class="box_btn1" @click.stop="bindorder(item)">接单</view>
|
|
|
+ <view class="box_btn1" @click.stop="bindorder(item,index)">接单</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<empty v-if="list_box.length == 0"></empty>
|
|
|
@@ -447,9 +448,9 @@
|
|
|
</view>
|
|
|
<u-line color="#E6E6E6" />
|
|
|
<view class="order_btn">
|
|
|
- <view class="btn1" v-if="item.indentState=='3'" @click.stop="quxiao(item.indentNumber)">取消订单
|
|
|
+ <view class="btn1" v-if="item.indentState=='3'" @click.stop="quxiao(item.indentNumber,index)">取消订单
|
|
|
</view>
|
|
|
- <view class="btn2" v-if="item.indentState=='3'" @click.stop="quhuo(item.indentId)">确认取货
|
|
|
+ <view class="btn2" v-if="item.indentState=='3'" @click.stop="quhuo(item.indentId,index)">确认取货
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -597,10 +598,10 @@
|
|
|
</view>
|
|
|
<u-line color="#E6E6E6" />
|
|
|
<view class="order_btn">
|
|
|
- <view class="btn1" v-if="item.indentState=='3'" @click.stop="quxiao(item.indentNumber)">取消订单
|
|
|
+ <view class="btn1" v-if="item.indentState=='3'" @click.stop="quxiao(item.indentNumber,index)">取消订单
|
|
|
</view>
|
|
|
<view class="btn1" v-if="item.indentState=='6'">客户待确认</view>
|
|
|
- <view class="btn2" v-if="item.indentState=='3'" @click.stop="quhuo(item.indentId)">确认取货
|
|
|
+ <view class="btn2" v-if="item.indentState=='3'" @click.stop="quhuo(item.indentId,index)">确认取货
|
|
|
</view>
|
|
|
<!-- <view class="flex"
|
|
|
v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1 &&item.deliveryImgs==null">
|
|
|
@@ -610,7 +611,7 @@
|
|
|
v-if="item.indentState=='4'||item.indentState=='7' &&item.deliveryImgs==null">
|
|
|
<view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
|
|
|
</view>
|
|
|
- <view class="btn2" style="margin-left: 10px;" v-if="item.indentState=='4'" @click.stop="shouhuo(item)">确认送达
|
|
|
+ <view class="btn2" style="margin-left: 10px;" v-if="item.indentState=='4'" @click.stop="shouhuo(item,index)">确认送达
|
|
|
</view>
|
|
|
<view class="btn2" v-if="item.indentState=='9'">已取消</view>
|
|
|
</view>
|
|
|
@@ -759,7 +760,7 @@
|
|
|
class="flex justify-center align-center">
|
|
|
<view>
|
|
|
<view class="text-center">
|
|
|
- <image src="https://moxuanyunshang.oss-cn-beijing.aliyuncs.com/duanxin/addimg.png" style="width: 65rpx;height: 55rpx;">
|
|
|
+ <image :src="Tupian('/duanxin/addimg.png')" style="width: 65rpx;height: 55rpx;">
|
|
|
</image>
|
|
|
</view>
|
|
|
<view class="text-center text-black">添加图片</view>
|
|
|
@@ -789,6 +790,196 @@
|
|
|
<view class="sure" @click="querenSh">确认送达</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <!-- 当前订单无法接的筛选条件 -->
|
|
|
+ <u-popup v-model="jiedanNo" mode="center"
|
|
|
+ border-radius="18" width="680rpx" height="600rpx">
|
|
|
+ <view style="margin-top: 30%;margin-left: 34%;">
|
|
|
+ <image style="width: 200rpx;height: 200rpx;" :src="Tupian('/qishou/wufajie.png')"
|
|
|
+ ></image>
|
|
|
+ <view>当前订单无法接单</view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+
|
|
|
+ <!-- 当前订单已接收 -->
|
|
|
+ <u-popup v-model="saomaPeisong" v-if="saomaPeisong" mode="center"
|
|
|
+ border-radius="18" width="680rpx" height="600rpx">
|
|
|
+ <view>
|
|
|
+ <view class="order_box" v-for="(item,index) in list2" :key="index"
|
|
|
+ @click="bindorderDetail(item.indentNumber,item.indentId)">
|
|
|
+ <view class="order_success" v-if="item.indentState=='2'">
|
|
|
+ <view class="order_name">待支付领取</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order_success" v-if="item.indentState=='3'">
|
|
|
+ <view class="order_name">待取货</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order_success" v-if="item.indentState=='4'">
|
|
|
+ <view class="order_name">配送中</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order_success" v-if="item.indentState=='5'">
|
|
|
+ <view class="order_name">已送达,客户待确认</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order_success" v-if="item.indentState=='6'">
|
|
|
+ <view class="order_name">客户已确认</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order_success" v-if="item.indentState=='7'">
|
|
|
+ <view class="order_name">已完成</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="order_success" v-if="item.indentState=='9'">
|
|
|
+ <view class="order_name">已取消</view>
|
|
|
+ <view class="order_data">{{item.receivingTime}}</view>
|
|
|
+ </view>
|
|
|
+ <u-line color="#E6E6E6" />
|
|
|
+ <view class="order_city">
|
|
|
+ <view class="city_type">
|
|
|
+ <view class="type_name" v-if="item.indentType == 1">帮我送</view>
|
|
|
+ <view class="type_name" v-if="item.indentType == 2">帮我取</view>
|
|
|
+ <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
|
|
|
+ <view class="type_name" v-if="item.indentType == 4">同城服务</view>
|
|
|
+ <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
|
|
|
+ <view class="city_text" v-if="item.itemType">{{item.itemType}}</view>
|
|
|
+ </view>
|
|
|
+ <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view>
|
|
|
+ <view style="padding:0 30rpx;color:#FF7F00">{{item.shopName}}</view>
|
|
|
+ <view style="padding:0 30rpx">订单编号:{{item.indentNumber}}</view>
|
|
|
+ <!-- 帮我送/帮我取 -->
|
|
|
+ <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
|
|
|
+ <view class="fh_box">
|
|
|
+ <view class="fh_image">
|
|
|
+ <image src="../../static/image/icon_f.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <!-- <view style="padding:0 30rpx;font-size: 20px;">#9</view> -->
|
|
|
+ <view class="fh_name">{{item.shopAddressDetail}}</view>
|
|
|
+ <view class="fh_type">{{item.shopName}}
|
|
|
+ <text>{{item.shopPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="sh_box">
|
|
|
+ <view class="sh_image">
|
|
|
+ <image src="../../static/image/icon_s.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <view class="sh_name">{{item.userAddressDetail}}</view>
|
|
|
+ <view class="sh_type">{{item.userName}}
|
|
|
+ <text>{{item.userPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 同城帮买 -->
|
|
|
+ <view class="city_address" v-if="item.indentType == 3">
|
|
|
+ <view class="fh_box" v-if="item.buy_type == 1">
|
|
|
+ <view class="fh_image">
|
|
|
+ <image src="../../static/image/icon_f.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
|
|
|
+ <view class="fh_name">{{item.shopAddressDetail}}</view>
|
|
|
+ <view class="fh_type">{{item.shopName}}
|
|
|
+ <text>{{item.shopPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="sh_box">
|
|
|
+ <view class="sh_image">
|
|
|
+ <image src="../../static/image/icon_s.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <view class="sh_name">{{item.userAddressDetail}}</view>
|
|
|
+ <view class="sh_type">{{item.userName}}
|
|
|
+ <text>{{item.userPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 同城服务 -->
|
|
|
+ <view class="city_address" v-if="item.indentType == 4">
|
|
|
+ <view class="sh_box">
|
|
|
+ <view class="sh_image">
|
|
|
+ <image src="../../static/image/icon_s.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <view class="sh_name">{{item.userAddressDetail}}</view>
|
|
|
+ <view class="sh_type">{{item.userName}}
|
|
|
+ <text>{{item.userPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 同城外卖 -->
|
|
|
+ <view class="city_address" v-if="item.indentType == 5">
|
|
|
+ <view class="fh_box">
|
|
|
+ <view class="fh_image">
|
|
|
+ <image src="../../static/image/icon_f.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
|
|
|
+ <view class="fh_name">{{item.shopAddressDetail}}</view>
|
|
|
+ <view class="fh_type">{{item.shopName}}
|
|
|
+ <text>{{item.shopPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="sh_box">
|
|
|
+ <view class="sh_image">
|
|
|
+ <image src="../../static/image/icon_s.png"></image>
|
|
|
+ </view>
|
|
|
+ <view class="box">
|
|
|
+ <view class="sh_name">{{item.userAddressDetail}}</view>
|
|
|
+ <view class="sh_type">{{item.userName}}
|
|
|
+ <text>{{item.userPhone}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <u-line color="#E6E6E6" />
|
|
|
+ <view class="order_btn">
|
|
|
+ <view class="btn1" v-if="item.indentState=='3'" @click.stop="quxiao(item.indentNumber,index)">取消订单
|
|
|
+ </view>
|
|
|
+ <view class="btn1" v-if="item.indentState=='6'">客户待确认</view>
|
|
|
+ <view class="btn2" v-if="item.indentState=='3'" @click.stop="quhuo(item.indentId,index)">确认取货
|
|
|
+ </view>
|
|
|
+ <!-- <view class="flex"
|
|
|
+ v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1 &&item.deliveryImgs==null">
|
|
|
+ <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
|
|
|
+ </view> -->
|
|
|
+ <view class="flex"
|
|
|
+ v-if="item.indentState=='4'||item.indentState=='7' &&item.deliveryImgs==null">
|
|
|
+ <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
|
|
|
+ </view>
|
|
|
+ <view class="btn2" style="margin-left: 10px;" v-if="item.indentState=='4'" @click.stop="shouhuo(item,index)">确认送达
|
|
|
+ </view>
|
|
|
+ <view class="btn2" v-if="item.indentState=='9'">已取消</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <empty v-if="list2.length == 0"></empty>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ </view>
|
|
|
+ <!-- 悬浮球 -->
|
|
|
+ <view style="width: 140rpx;height: 140rpx;position: fixed;bottom: 130px;right: 20rpx;">
|
|
|
+ <!-- 上线 -->
|
|
|
+ <image v-if="!seen" :src="Tupian('/qishou/sao.png')" style="width: 100%;height: 100%;" @click="saoma()" mode="">
|
|
|
+ </image>
|
|
|
+ <!-- 下线 -->
|
|
|
+ <image v-if="seen" :src="Tupian('/qishou/sao.png')" style="width: 100%;height: 100%;" @click="bindorder1()" mode="">
|
|
|
+ </image>
|
|
|
+ <image v-if="!seen" :src="Tupian('/qishou/lu.png')" style="width: 100%;height: 100%;" @click="luma()" mode="">
|
|
|
+ </image>
|
|
|
+ <image v-if="seen" :src="Tupian('/qishou/lu.png')" style="width: 100%;height: 100%;" @click="bindorder1()" mode="">
|
|
|
+ </image>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -822,6 +1013,7 @@
|
|
|
Authorization: false,
|
|
|
alertPhone:false,//确认收货拍照弹出框
|
|
|
alertduan:false,//确认收货选择短信框
|
|
|
+ saomaPeisong:false,//扫码后配送中的单
|
|
|
privacyContractName: '',
|
|
|
checkxdd: '否',
|
|
|
xddNumber: 0,
|
|
|
@@ -915,12 +1107,17 @@
|
|
|
qiPhone:'',//骑手电话
|
|
|
ifrenwu:false,
|
|
|
shopId:'',
|
|
|
+
|
|
|
+ shoudanma:'',//收单码
|
|
|
+ jiedanNo:false,//当前不能接
|
|
|
+ list2:[],
|
|
|
}
|
|
|
},
|
|
|
onHide() {
|
|
|
clearInterval(this.time)
|
|
|
},
|
|
|
onLoad() {
|
|
|
+ console.log(this.shouhuoma,'码')
|
|
|
uni.showLoading({
|
|
|
title: '加载中...',
|
|
|
mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
@@ -1089,6 +1286,170 @@
|
|
|
// #endif
|
|
|
},
|
|
|
methods: {
|
|
|
+ //扫码取单,订单直接变为配送中
|
|
|
+ saoma(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '扫码中...',
|
|
|
+ mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
+ })
|
|
|
+ var that = this;
|
|
|
+ wx.scanCode({
|
|
|
+ onlyFromCamera: false,// 只允许从相机扫码
|
|
|
+ success(res){
|
|
|
+ console.log("扫码成功:"+JSON.stringify(res)+res.result)
|
|
|
+ that.shoudanma=res.result
|
|
|
+ setTimeout(function() {
|
|
|
+ that.saomaCha()
|
|
|
+ }, 700);
|
|
|
+
|
|
|
+ //扫码成功并且有订单接单成功,变为配送中
|
|
|
+ //扫码成功后调用收单接口,判断是否成功和是否为配送中
|
|
|
+ // that.current = 2
|
|
|
+ // console.log(that.current,'that.current')
|
|
|
+ //当前订单无法接
|
|
|
+ // that.jiedanNo=true
|
|
|
+
|
|
|
+ // 扫码成功后 在此处理接下来的逻辑
|
|
|
+ // that.setData({
|
|
|
+ // shoudanma: res.result
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ uni.hideLoading();
|
|
|
+ },
|
|
|
+ //录码收单
|
|
|
+ luma(){
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages/index/luma'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 扫码查询订单列表
|
|
|
+ saomaCha() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
+ });
|
|
|
+ var that=this
|
|
|
+ that.$Request.getT('/app/tbindent/selectTbIndentPage', {
|
|
|
+ page: 1,
|
|
|
+ limit: 10,
|
|
|
+ acquireCode:that.shoudanma
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res,'lk')
|
|
|
+ uni.hideLoading()
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.list.length > 0) {
|
|
|
+ for (var i = 0; i < res.data.list.length; i++) {
|
|
|
+ if (res.data.list[i].distancess > 1000) {
|
|
|
+ res.data.list[i].distancess = Number((res.data.list[i].distancess / 1000))
|
|
|
+ .toFixed(
|
|
|
+ 2) + "km"
|
|
|
+ } else {
|
|
|
+ if (res.data.list[i].distancess == '0') {
|
|
|
+ res.data.list[i].distancess = "0m";
|
|
|
+ } else {
|
|
|
+ res.data.list[i].distancess = Number(res.data.list[i].distancess).toFixed(
|
|
|
+ 1) +
|
|
|
+ "m";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (res.data.list[i].distancessd > 1000) {
|
|
|
+ res.data.list[i].distancessd = Number((res.data.list[i].distancessd / 1000))
|
|
|
+ .toFixed(2) + "km"
|
|
|
+ } else {
|
|
|
+ if (res.data.list[i].distancessd == '0') {
|
|
|
+ res.data.list[i].distancessd = "0m";
|
|
|
+ } else {
|
|
|
+ res.data.list[i].distancessd = Number(res.data.list[i].distancessd)
|
|
|
+ .toFixed(
|
|
|
+ 1) + "m";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var saomajie=[]
|
|
|
+ saomajie=res.data.list
|
|
|
+ that.list2=res.data.list
|
|
|
+ console.log(saomajie,'列表')
|
|
|
+ if(that.list2.length>0){
|
|
|
+ if (that.list2[0].indentState=='2' || that.list2[0].indentState=='3') {
|
|
|
+ //收单
|
|
|
+ that.shouorder()
|
|
|
+ } else if(that.list2[0].indentState=='4') {
|
|
|
+ that.saomaPeisong=true
|
|
|
+ }else{
|
|
|
+ that.jiedanNo=true
|
|
|
+ that.shoudanma=''
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ // that.saomaPeisong=true
|
|
|
+ that.jiedanNo=true
|
|
|
+ that.shoudanma=''
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if(res.msg=="当前订单无法接单"){
|
|
|
+ that.jiedanNo=true
|
|
|
+ that.shoudanma=''
|
|
|
+ }
|
|
|
+ that.$forceUpdate()
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ // 加载提示关闭
|
|
|
+ uni.hideLoading()
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 收单
|
|
|
+ shouorder() {
|
|
|
+ let that = this
|
|
|
+ if (that.checkCertification == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '实名认证审核中,无法收单',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (that.checkCertification == 2) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '实名认证未通过,无法收单',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中',
|
|
|
+ mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
+ });
|
|
|
+ console.log('用户点击确定');
|
|
|
+ that.$Request.postT('/app/tbindent/orderIndentReceiving', {
|
|
|
+ acquireCode: that.shoudanma
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res,'ppp')
|
|
|
+ if (res.code == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '收单成功',
|
|
|
+ icon: 'none',
|
|
|
+ });
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ that.current=2
|
|
|
+ that.indentState = 4
|
|
|
+ that.taskDataJ()
|
|
|
+ }, 1200);
|
|
|
+ } else {
|
|
|
+ console.log('失败:', res.data)
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ });
|
|
|
+ // that.taskData()
|
|
|
+ }
|
|
|
+ // 加载提示关闭
|
|
|
+ uni.hideLoading()
|
|
|
+ that.shouhuoma = ''
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
// 打开隐私协议页面
|
|
|
openPrivacyContract() {
|
|
|
let that = this;
|
|
|
@@ -1422,7 +1783,7 @@
|
|
|
|
|
|
},
|
|
|
// 接单
|
|
|
- bindorder(item) {
|
|
|
+ bindorder(item,index) {
|
|
|
let that = this
|
|
|
if (!that.userId) {
|
|
|
uni.showModal({
|
|
|
@@ -1499,33 +1860,40 @@
|
|
|
title: '加载中',
|
|
|
mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
});
|
|
|
- console.log('用户点击确定');
|
|
|
+ console.log('用户点击确定',item.indentNumber);
|
|
|
that.$Request.postT('/app/tbindent/indentReceiving', {
|
|
|
indentNumber: item.indentNumber
|
|
|
}).then(res => {
|
|
|
+ console.log(res,'kkk')
|
|
|
if (res.code == 0) {
|
|
|
- that.page1 = 1
|
|
|
+ // that.page1 = 1
|
|
|
// this.getShanglist()
|
|
|
- that.taskData()
|
|
|
+ // that.taskData()
|
|
|
uni.showToast({
|
|
|
title: '接单成功',
|
|
|
icon: 'none',
|
|
|
- duration: 1000
|
|
|
});
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ //刷新当前列,不返回分页的第一条
|
|
|
+ that.list_box.splice(index,1);
|
|
|
+ }, 1200);
|
|
|
} else {
|
|
|
console.log('失败:', res.data)
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
icon: 'none',
|
|
|
- duration: 1500
|
|
|
});
|
|
|
- if(!that.ifrenwu){
|
|
|
- that.page1 = 1
|
|
|
- that.getShanglist()
|
|
|
- }else{
|
|
|
- that.page2 = 1
|
|
|
- that.taskData()
|
|
|
- }
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ if(!that.ifrenwu){
|
|
|
+ that.page1 = 1
|
|
|
+ that.getShanglist()
|
|
|
+ }else{
|
|
|
+ that.page2 = 1
|
|
|
+ that.taskData()
|
|
|
+ }
|
|
|
+ }, 1200);
|
|
|
// that.getShanglist()
|
|
|
// that.taskData()
|
|
|
}
|
|
|
@@ -1611,6 +1979,7 @@
|
|
|
title: '加载中',
|
|
|
mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
});
|
|
|
+
|
|
|
this.$Request.postJson('/app/tbindent/find-new-indent', {
|
|
|
buyTpye:"",// 购买类型 0:骑手就近购买;1:用户指定地址购买"
|
|
|
page: this.page2,
|
|
|
@@ -1916,7 +2285,7 @@
|
|
|
})
|
|
|
},
|
|
|
// 取消订单
|
|
|
- quxiao(indentNumber) {
|
|
|
+ quxiao(indentNumber,index) {
|
|
|
// #ifdef MP-WEIXIN
|
|
|
if (uni.getStorageSync('sendMsg')) {
|
|
|
uni.requestSubscribeMessage({
|
|
|
@@ -1952,15 +2321,25 @@
|
|
|
if (res.code == 0) {
|
|
|
uni.showToast({
|
|
|
title: '订单已取消',
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
- that.taskDataJ()
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ //刷新当前列,不返回分页的第一条
|
|
|
+ that.lists.splice(index,1);
|
|
|
+ }, 1200);
|
|
|
+
|
|
|
+ // that.taskDataJ()
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
- that.taskDataJ()
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ that.taskDataJ()
|
|
|
+ }, 1200);
|
|
|
+
|
|
|
}
|
|
|
// 加载提示关闭
|
|
|
uni.hideLoading()
|
|
|
@@ -1971,7 +2350,7 @@
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- quhuo(indentId) {
|
|
|
+ quhuo(indentId,index) {
|
|
|
let that = this
|
|
|
// #ifdef MP-WEIXIN
|
|
|
if (uni.getStorageSync('sendMsg')) {
|
|
|
@@ -2007,24 +2386,26 @@
|
|
|
if (res.code == 0) {
|
|
|
uni.showToast({
|
|
|
title: '确认取货成功',
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
// that.indentState = 4
|
|
|
setTimeout(function() {
|
|
|
- that.taskDataJ()
|
|
|
+ // that.taskDataJ()
|
|
|
+ //刷新当前列,不返回分页的第一条
|
|
|
+ that.lists.splice(index,1);
|
|
|
// that.current = 2
|
|
|
|
|
|
- }, 1000)
|
|
|
+ }, 1200)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
setTimeout(function() {
|
|
|
that.taskDataJ()
|
|
|
// that.current = 2
|
|
|
|
|
|
- }, 1000)
|
|
|
+ }, 1200)
|
|
|
}
|
|
|
// 加载提示关闭
|
|
|
uni.hideLoading()
|
|
|
@@ -2038,11 +2419,26 @@
|
|
|
},
|
|
|
//拍照
|
|
|
paiOrder(e){
|
|
|
+ if(this.shoudanma!=''){
|
|
|
+ this.saomaPeisong=false
|
|
|
+ this.indentNumber = e.indentNumber
|
|
|
+ this.orderId=e.orderId
|
|
|
+ this.alertPhone=true
|
|
|
+ return
|
|
|
+ }
|
|
|
this.indentNumber = e.indentNumber
|
|
|
this.orderId=e.orderId
|
|
|
this.alertPhone=true
|
|
|
},
|
|
|
- shouhuo(e) {
|
|
|
+ shouhuo(e,index) {
|
|
|
+ if(this.shoudanma!=''){
|
|
|
+ this.saomaPeisong=false
|
|
|
+ this.orderId=e.orderId
|
|
|
+ this.querenduanxinList()
|
|
|
+ //需拍照的弹出框
|
|
|
+ this.alertduan=true
|
|
|
+ return
|
|
|
+ }
|
|
|
this.indentNumber = e.indentNumber
|
|
|
// if(e.indentType==5){
|
|
|
// this.querenSh()
|
|
|
@@ -2146,15 +2542,24 @@
|
|
|
}).then(res => {
|
|
|
console.log(res,'img')
|
|
|
if (res.code == 0) {
|
|
|
+ if(this.shoudanma!=''){
|
|
|
+ this.alertPhone = false
|
|
|
+ this.saomaCha()
|
|
|
+ // this.saomaPeisong=true
|
|
|
+ }
|
|
|
this.alertPhone = false
|
|
|
uni.showToast({
|
|
|
title: '图片上传完成',
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+
|
|
|
+ }, 1200);
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
}
|
|
|
// 加载提示关闭
|
|
|
@@ -2184,7 +2589,7 @@
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
}
|
|
|
// 加载提示关闭
|
|
|
@@ -2218,6 +2623,39 @@
|
|
|
title: '加载中',
|
|
|
mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
});
|
|
|
+ if(this.shoudanma!=''){
|
|
|
+ console.log('1aaaaa')
|
|
|
+ this.$Request.postJson('/app/tbindent/orderRiderDelivery', {
|
|
|
+ smsTemplateId:that.duanxin[0].id,
|
|
|
+ // indentNumber: that.indentNumber,
|
|
|
+ acquireCode:that.shoudanma,
|
|
|
+ // imgs:'',
|
|
|
+ // itemCode: Rcode
|
|
|
+ // itemCode: that.shouhuoma
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.code == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '订单完成',
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ that.alertduan = false
|
|
|
+ }, 1200);
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: "none",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 加载提示关闭
|
|
|
+ uni.hideLoading()
|
|
|
+ that.shouhuoma = ''
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log('2bbbbb')
|
|
|
this.$Request.postJson('/app/tbindent/riderDelivery', {
|
|
|
smsTemplateId:this.duanxin[0].id,
|
|
|
indentNumber: that.indentNumber,
|
|
|
@@ -2232,16 +2670,25 @@
|
|
|
this.shows = false
|
|
|
uni.showToast({
|
|
|
title: '订单完成',
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
- this.lists = []
|
|
|
- that.taskDataJ()
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ that.alertduan = false
|
|
|
+ // this.alertduan = false
|
|
|
+ that.shows = false
|
|
|
+ }, 1200);
|
|
|
+ // this.lists = []
|
|
|
+ // that.taskDataJ()
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
|
- icon: "none"
|
|
|
+ icon: "none",
|
|
|
});
|
|
|
- that.taskDataJ()
|
|
|
+ // 在toast显示2000毫秒(2秒)后执行操作
|
|
|
+ setTimeout(function() {
|
|
|
+ that.taskDataJ()
|
|
|
+ }, 1200);
|
|
|
}
|
|
|
// 加载提示关闭
|
|
|
uni.hideLoading()
|
|
|
@@ -2311,7 +2758,7 @@
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '已经最后一页啦',
|
|
|
- icon: 'none'
|
|
|
+ icon: 'none',
|
|
|
})
|
|
|
}
|
|
|
}else{
|
|
|
@@ -2322,7 +2769,7 @@
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '已经最后一页啦',
|
|
|
- icon: 'none'
|
|
|
+ icon: 'none',
|
|
|
})
|
|
|
}
|
|
|
}
|