|
@@ -22,8 +22,18 @@
|
|
|
</u-tabs>
|
|
</u-tabs>
|
|
|
|
|
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
|
|
+ <!-- 新任务,展示所有商家时 -->
|
|
|
|
|
+ <view class="tabs_box" :class="{dis:current == 0}" v-if="!ifrenwu">
|
|
|
|
|
+ <view class="list_box2" v-for="(item,index) in list_shanghu" :key="index"
|
|
|
|
|
+ @click="dingdetails(item.shopId)">
|
|
|
|
|
+ <view style="line-height: 40px;font-size: 20px;margin-left: 20px;">{{item.shopName}}
|
|
|
|
|
+ <text style="font-size: 16px;margin-left: 80px;">订单数:{{item.countOfWaitAccept}}单</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
<!-- 新任务 -->
|
|
<!-- 新任务 -->
|
|
|
- <view class="tabs_box" :class="{dis:current == 0}">
|
|
|
|
|
|
|
+ <view class="tabs_box" :class="{dis:current == 0}" v-if="ifrenwu">
|
|
|
|
|
+ <view class="box_btn5" @click.stop="fanhuiShang">返回</view>
|
|
|
<!-- 下线中 -->
|
|
<!-- 下线中 -->
|
|
|
<view class="list_box" v-for="(item,index) in list_box" :key="index" v-show="seen"
|
|
<view class="list_box" v-for="(item,index) in list_box" :key="index" v-show="seen"
|
|
|
@click="binddetails(item.indentNumber,item.indentType)">
|
|
@click="binddetails(item.indentNumber,item.indentType)">
|
|
@@ -35,12 +45,13 @@
|
|
|
<view class="box_one" v-if="item.indentType==5">同城外卖</view>
|
|
<view class="box_one" v-if="item.indentType==5">同城外卖</view>
|
|
|
<view class="box_two" v-if="item.indentType==4 &&item.serviceType">{{item.serviceType}}
|
|
<view class="box_two" v-if="item.indentType==4 &&item.serviceType">{{item.serviceType}}
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="padding:0 10rpx;color:#FF7F00">{{item.shopName}}</view>
|
|
|
|
|
<view class="box_two box_two1" v-if="item.itemType!=null||item.itemWeight!=null">
|
|
<view class="box_two box_two1" v-if="item.itemType!=null||item.itemWeight!=null">
|
|
|
{{item.itemType}} {{item.itemWeight}}
|
|
{{item.itemType}} {{item.itemWeight}}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="box_three" v-if="item.indentType==4&&item.tool">{{item.tool}}</view>
|
|
<view class="box_three" v-if="item.indentType==4&&item.tool">{{item.tool}}</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view style="padding:0 10rpx;color:#FF7F00">{{item.shopName}}</view>
|
|
|
|
|
+ <view style="padding:0 10rpx">订单编号:{{item.indentNumber}}</view>
|
|
|
<!-- 同城服务 -->
|
|
<!-- 同城服务 -->
|
|
|
<view class="part2" v-if="item.indentType==4">
|
|
<view class="part2" v-if="item.indentType==4">
|
|
|
|
|
|
|
@@ -137,7 +148,6 @@
|
|
|
<view class="box_one" v-if="item.indentType==5">同城外卖</view>
|
|
<view class="box_one" v-if="item.indentType==5">同城外卖</view>
|
|
|
<view class="box_two" v-if="item.indentType==4 &&item.serviceType">{{item.serviceType}}
|
|
<view class="box_two" v-if="item.indentType==4 &&item.serviceType">{{item.serviceType}}
|
|
|
</view>
|
|
</view>
|
|
|
- <view style="padding:0 10rpx;color:#FF7F00">{{item.shopName}}</view>
|
|
|
|
|
<view class="box_two box_two1" v-if="item.itemType!=null||item.itemWeight!=null">
|
|
<view class="box_two box_two1" v-if="item.itemType!=null||item.itemWeight!=null">
|
|
|
{{item.itemType}} {{item.itemWeight}}
|
|
{{item.itemType}} {{item.itemWeight}}
|
|
|
</view>
|
|
</view>
|
|
@@ -147,6 +157,8 @@
|
|
|
<view style="position: absolute;right: 0;font-size: 22rpx;color: #999;">{{item.createTime}}
|
|
<view style="position: absolute;right: 0;font-size: 22rpx;color: #999;">{{item.createTime}}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view style="padding:0 30rpx;color:#FF7F00">{{item.shopName}}</view>
|
|
|
|
|
+ <view style="padding:0 30rpx">订单编号:{{item.indentNumber}}</view>
|
|
|
<!-- 同城服务 -->
|
|
<!-- 同城服务 -->
|
|
|
<view class="part2" v-if="item.indentType==4">
|
|
<view class="part2" v-if="item.indentType==4">
|
|
|
<view class="box_add">
|
|
<view class="box_add">
|
|
@@ -334,6 +346,8 @@
|
|
|
<view class="type_name" v-if="item.indentType == 5">同城外卖</view>
|
|
<view class="type_name" v-if="item.indentType == 5">同城外卖</view>
|
|
|
<view class="city_text" v-if="item.itemType">{{item.itemType}}</view>
|
|
<view class="city_text" v-if="item.itemType">{{item.itemType}}</view>
|
|
|
</view>
|
|
</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="city_address" v-if="item.indentType == 1 || item.indentType == 2">
|
|
|
<view class="fh_box">
|
|
<view class="fh_box">
|
|
@@ -477,6 +491,8 @@
|
|
|
<view class="type_name" v-if="item.indentType == 5">同城外卖</view>
|
|
<view class="type_name" v-if="item.indentType == 5">同城外卖</view>
|
|
|
<view class="city_text" v-if="item.itemType">{{item.itemType}}</view>
|
|
<view class="city_text" v-if="item.itemType">{{item.itemType}}</view>
|
|
|
</view>
|
|
</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="city_address" v-if="item.indentType == 1 || item.indentType == 2">
|
|
|
<view class="fh_box">
|
|
<view class="fh_box">
|
|
@@ -814,6 +830,7 @@
|
|
|
}],
|
|
}],
|
|
|
current: 0,
|
|
current: 0,
|
|
|
page: 1,
|
|
page: 1,
|
|
|
|
|
+ list_shanghu:[],
|
|
|
list_box: [],
|
|
list_box: [],
|
|
|
list_tip: [],
|
|
list_tip: [],
|
|
|
take_list: [],
|
|
take_list: [],
|
|
@@ -857,7 +874,7 @@
|
|
|
shouhuoma: '',
|
|
shouhuoma: '',
|
|
|
userId: '', //用户id
|
|
userId: '', //用户id
|
|
|
checkCertification: '', //是否实名认证
|
|
checkCertification: '', //是否实名认证
|
|
|
- receivingPettern: 2, //1近单模式 2同城模式
|
|
|
|
|
|
|
+ receivingPettern: '2', //1近单模式 2同城模式
|
|
|
province: '',
|
|
province: '',
|
|
|
city: '',
|
|
city: '',
|
|
|
district: '',
|
|
district: '',
|
|
@@ -872,13 +889,14 @@
|
|
|
count: 3,
|
|
count: 3,
|
|
|
duanxin:[],//发送的短信
|
|
duanxin:[],//发送的短信
|
|
|
qiPhone:'',//骑手电话
|
|
qiPhone:'',//骑手电话
|
|
|
|
|
+ ifrenwu:false,
|
|
|
|
|
+ shopId:'',
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onHide() {
|
|
onHide() {
|
|
|
clearInterval(this.time)
|
|
clearInterval(this.time)
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
- this.qiPhone=uni.getStorageSync('phone')
|
|
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '加载中...'
|
|
title: '加载中...'
|
|
|
|
|
|
|
@@ -888,10 +906,12 @@
|
|
|
this.longitude = dizhi.longitude
|
|
this.longitude = dizhi.longitude
|
|
|
this.latitude = dizhi.latitude
|
|
this.latitude = dizhi.latitude
|
|
|
}
|
|
}
|
|
|
- this.taskData()
|
|
|
|
|
|
|
+ this.getShanglist()
|
|
|
|
|
+ // this.taskData()
|
|
|
let that = this
|
|
let that = this
|
|
|
this.time = setInterval(function() {
|
|
this.time = setInterval(function() {
|
|
|
- that.taskData()
|
|
|
|
|
|
|
+ this.getShanglist()
|
|
|
|
|
+ // that.taskData()
|
|
|
that.getLocation()
|
|
that.getLocation()
|
|
|
}, 5000)
|
|
}, 5000)
|
|
|
|
|
|
|
@@ -1175,6 +1195,7 @@
|
|
|
that.seen = res.data.onLineFlag == 1 ? false : true
|
|
that.seen = res.data.onLineFlag == 1 ? false : true
|
|
|
// that.xddcheck = res.data.isSendMsg == 2 ? false : true;
|
|
// that.xddcheck = res.data.isSendMsg == 2 ? false : true;
|
|
|
that.checkCertification = res.data.checkCertification
|
|
that.checkCertification = res.data.checkCertification
|
|
|
|
|
+ this.qiPhone=res.data.phone
|
|
|
uni.setStorageSync('phone',res.data.phone)
|
|
uni.setStorageSync('phone',res.data.phone)
|
|
|
uni.setStorageSync("checkCertification", res.data.checkCertification);
|
|
uni.setStorageSync("checkCertification", res.data.checkCertification);
|
|
|
if (that.seen) {
|
|
if (that.seen) {
|
|
@@ -1192,7 +1213,8 @@
|
|
|
that.latitude = res.latitude
|
|
that.latitude = res.latitude
|
|
|
that.locationUpdate(that.longitude, that.latitude)
|
|
that.locationUpdate(that.longitude, that.latitude)
|
|
|
if (that.current == 0) {
|
|
if (that.current == 0) {
|
|
|
- that.taskData()
|
|
|
|
|
|
|
+ this.getShanglist()
|
|
|
|
|
+ // that.taskData()
|
|
|
} else if (that.current == 1) {
|
|
} else if (that.current == 1) {
|
|
|
that.indentState = 3
|
|
that.indentState = 3
|
|
|
that.taskDataJ()
|
|
that.taskDataJ()
|
|
@@ -1230,7 +1252,9 @@
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '加载中...'
|
|
title: '加载中...'
|
|
|
})
|
|
})
|
|
|
- this.taskData()
|
|
|
|
|
|
|
+ this.ifrenwu=false
|
|
|
|
|
+ this.getShanglist()
|
|
|
|
|
+ // this.taskData()
|
|
|
} else if (index == 1) { //待取货
|
|
} else if (index == 1) { //待取货
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title: '加载中...'
|
|
title: '加载中...'
|
|
@@ -1310,11 +1334,23 @@
|
|
|
lat: lat,
|
|
lat: lat,
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
console.log('位置信息更新', res)
|
|
console.log('位置信息更新', res)
|
|
|
- that.taskData()
|
|
|
|
|
|
|
+ this.getShanglist()
|
|
|
|
|
+ // that.taskData()
|
|
|
});
|
|
});
|
|
|
// }, 600000)
|
|
// }, 600000)
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ //跳转某商家订单
|
|
|
|
|
+ dingdetails(shopId){
|
|
|
|
|
+ this.shopId=shopId
|
|
|
|
|
+ this.ifrenwu=true
|
|
|
|
|
+ this.taskData()
|
|
|
|
|
+ },
|
|
|
|
|
+ //返回商户
|
|
|
|
|
+ fanhuiShang(){
|
|
|
|
|
+ this.ifrenwu=false
|
|
|
|
|
+ this.getShanglist()
|
|
|
|
|
+ },
|
|
|
// 跳转订单详情
|
|
// 跳转订单详情
|
|
|
binddetails(id, types) {
|
|
binddetails(id, types) {
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
@@ -1426,6 +1462,7 @@
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
that.page = 1
|
|
that.page = 1
|
|
|
|
|
+ // this.getShanglist()
|
|
|
that.taskData()
|
|
that.taskData()
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '接单成功',
|
|
title: '接单成功',
|
|
@@ -1440,6 +1477,7 @@
|
|
|
duration: 1500
|
|
duration: 1500
|
|
|
});
|
|
});
|
|
|
that.page = 1
|
|
that.page = 1
|
|
|
|
|
+ this.getShanglist()
|
|
|
that.taskData()
|
|
that.taskData()
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1483,15 +1521,43 @@
|
|
|
console.log('第一个')
|
|
console.log('第一个')
|
|
|
this.show = true
|
|
this.show = true
|
|
|
},
|
|
},
|
|
|
|
|
+ //获取接单池各商家列表
|
|
|
|
|
+ getShanglist(){
|
|
|
|
|
+ this.$Request.postJson('/app/tbindent/find-new-indent-group-by-shop', {
|
|
|
|
|
+ buyTpye:"",// 购买类型 0:骑手就近购买;1:用户指定地址购买"
|
|
|
|
|
+ indentType: this.indentType,
|
|
|
|
|
+ limit: 10,
|
|
|
|
|
+ page: this.page,
|
|
|
|
|
+ receivingPattern: this.receivingPettern,
|
|
|
|
|
+ riderLat: this.latitude,
|
|
|
|
|
+ riderLng: this.longitude
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if (res.data) {
|
|
|
|
|
+ if (res.data.list.length > 0) {
|
|
|
|
|
+ }
|
|
|
|
|
+ this.totalCount = res.data.totalCount
|
|
|
|
|
+ if (this.page == 1) {
|
|
|
|
|
+ this.list_shanghu = res.data.list
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.list_shanghu = this.list_shanghu.concat(list)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
// 获取新任务数据
|
|
// 获取新任务数据
|
|
|
taskData() {
|
|
taskData() {
|
|
|
- this.$Request.postJson('/app/tbindent/findNewIndent', {
|
|
|
|
|
|
|
+ this.$Request.postJson('/app/tbindent/find-new-indent', {
|
|
|
|
|
+ buyTpye:"",// 购买类型 0:骑手就近购买;1:用户指定地址购买"
|
|
|
page: this.page,
|
|
page: this.page,
|
|
|
limit: 10,
|
|
limit: 10,
|
|
|
- riderlat: this.longitude,
|
|
|
|
|
- riderlng: this.latitude,
|
|
|
|
|
- receivingPettern: this.receivingPettern,
|
|
|
|
|
|
|
+ receivingPattern: this.receivingPettern,
|
|
|
indentType: this.indentType,
|
|
indentType: this.indentType,
|
|
|
|
|
+ shopId: this.shopId,
|
|
|
|
|
+ riderLat: this.latitude,
|
|
|
|
|
+ riderLng: this.longitude
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
@@ -1601,12 +1667,12 @@
|
|
|
|
|
|
|
|
if (e == true) {
|
|
if (e == true) {
|
|
|
|
|
|
|
|
- this.receivingPettern = 1
|
|
|
|
|
|
|
+ this.receivingPettern = '1'
|
|
|
}
|
|
}
|
|
|
if (e == false) {
|
|
if (e == false) {
|
|
|
// this.checked = false
|
|
// this.checked = false
|
|
|
// this.check = true
|
|
// this.check = true
|
|
|
- this.receivingPettern = 2
|
|
|
|
|
|
|
+ this.receivingPettern = '2'
|
|
|
}
|
|
}
|
|
|
console.log(e)
|
|
console.log(e)
|
|
|
},
|
|
},
|
|
@@ -1634,12 +1700,12 @@
|
|
|
if (e == true) {
|
|
if (e == true) {
|
|
|
// this.checked = true
|
|
// this.checked = true
|
|
|
// this.check = false
|
|
// this.check = false
|
|
|
- this.receivingPettern = 2
|
|
|
|
|
|
|
+ this.receivingPettern = '2'
|
|
|
}
|
|
}
|
|
|
if (e == false) {
|
|
if (e == false) {
|
|
|
// this.checked = false
|
|
// this.checked = false
|
|
|
// this.check = true
|
|
// this.check = true
|
|
|
- this.receivingPettern = 1
|
|
|
|
|
|
|
+ this.receivingPettern = '1'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 打开类型选择模态框
|
|
// 打开类型选择模态框
|
|
@@ -1748,6 +1814,7 @@
|
|
|
this.longitude = this.quyuLongitude
|
|
this.longitude = this.quyuLongitude
|
|
|
this.latitude = this.quyuLatitude
|
|
this.latitude = this.quyuLatitude
|
|
|
}
|
|
}
|
|
|
|
|
+ this.getShanglist()
|
|
|
this.taskData()
|
|
this.taskData()
|
|
|
},
|
|
},
|
|
|
// 订单详情
|
|
// 订单详情
|
|
@@ -1971,7 +2038,7 @@
|
|
|
// 获取确认送达短信模板
|
|
// 获取确认送达短信模板
|
|
|
querenduanxin() {
|
|
querenduanxin() {
|
|
|
// this.$Request.postT('/app/tb-indent-sms/template', {
|
|
// this.$Request.postT('/app/tb-indent-sms/template', {
|
|
|
- this.$Request.getT2('/app/tb-indent-sms/template', {
|
|
|
|
|
|
|
+ this.$Request.getT('/app/tb-indent-sms/template', {
|
|
|
// indentNumber: this.indentNumber,
|
|
// indentNumber: this.indentNumber,
|
|
|
// itemCode: this.shouhuoma
|
|
// itemCode: this.shouhuoma
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -2014,7 +2081,7 @@
|
|
|
// var year = date.getFullYear();
|
|
// var year = date.getFullYear();
|
|
|
// let Rcode = year + that.shouhuoma
|
|
// let Rcode = year + that.shouhuoma
|
|
|
// that.$Request.postT('/app/tbindent/riderDelivery', {
|
|
// that.$Request.postT('/app/tbindent/riderDelivery', {
|
|
|
- this.$Request.postJson2('/app/tbindent/riderDelivery', {
|
|
|
|
|
|
|
+ this.$Request.postJson('/app/tbindent/riderDelivery', {
|
|
|
imgs:tupian,
|
|
imgs:tupian,
|
|
|
smsTemplateId:this.duanxin[0].id,
|
|
smsTemplateId:this.duanxin[0].id,
|
|
|
indentNumber: that.indentNumber,
|
|
indentNumber: that.indentNumber,
|
|
@@ -2106,12 +2173,13 @@
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ this.getShanglist()
|
|
|
this.taskData();
|
|
this.taskData();
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh: function() {
|
|
onPullDownRefresh: function() {
|
|
|
this.page = 1;
|
|
this.page = 1;
|
|
|
if (this.current == 0) {
|
|
if (this.current == 0) {
|
|
|
|
|
+ this.getShanglist()
|
|
|
this.taskData();
|
|
this.taskData();
|
|
|
} else {
|
|
} else {
|
|
|
this.taskDataJ();
|
|
this.taskDataJ();
|
|
@@ -2299,6 +2367,15 @@
|
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
|
padding-bottom: 20rpx;
|
|
padding-bottom: 20rpx;
|
|
|
}
|
|
}
|
|
|
|
|
+ .list_box2{
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
|
+ border-radius: 23rpx;
|
|
|
|
|
+ box-shadow: 0rpx 5rpx 5rpx 0rpx rgba(198, 186, 181, 0.20);
|
|
|
|
|
+ margin-top: 20rpx;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.part1 {
|
|
.part1 {
|
|
|
width: 90%;
|
|
width: 90%;
|
|
@@ -2514,6 +2591,18 @@
|
|
|
letter-spacing: 2rpx;
|
|
letter-spacing: 2rpx;
|
|
|
border-radius: 8rpx;
|
|
border-radius: 8rpx;
|
|
|
}
|
|
}
|
|
|
|
|
+ .box_btn5{
|
|
|
|
|
+ width: 16%;
|
|
|
|
|
+ margin-left: 40rpx;
|
|
|
|
|
+ background: #FF7F00;
|
|
|
|
|
+ height: 60rpx;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 60rpx;
|
|
|
|
|
+ font-size: 31rpx;
|
|
|
|
|
+ letter-spacing: 2rpx;
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.part_six {
|
|
.part_six {
|
|
|
width: 90%;
|
|
width: 90%;
|