|
|
@@ -92,7 +92,7 @@
|
|
|
|
|
|
<view class="flex"
|
|
|
v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1">
|
|
|
- <view class="btn_" @click.stop="duanxinOrder(item)" style="width: 90px;">送达并发短信</view>
|
|
|
+ <view class="btn_" @click.stop="duanxinOrder(item,index)" style="width: 90px;">送达并发短信</view>
|
|
|
</view>
|
|
|
<view class="flex"
|
|
|
v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1 &&item.deliveryImgs==null">
|
|
|
@@ -354,7 +354,9 @@
|
|
|
cw: uni.getSystemInfoSync().windowWidth,
|
|
|
messageConfiguration:'',
|
|
|
timer:null,
|
|
|
- errCount:0
|
|
|
+ errCount:0,
|
|
|
+ activeIndex:null,
|
|
|
+ spliceCount:0
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
@@ -622,8 +624,14 @@
|
|
|
orderId: e.orderId
|
|
|
}
|
|
|
that.$Request.postA("/admin/order/adminCancelOrder", data).then(res => {
|
|
|
+ // console.log(res);
|
|
|
if (res.code == 0) {
|
|
|
that.getOrderList()
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:res.msg,
|
|
|
+ icon:'none'
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
} else if (res.cancel) {
|
|
|
@@ -633,7 +641,9 @@
|
|
|
});
|
|
|
},
|
|
|
//发短信送达
|
|
|
- duanxinOrder(e){
|
|
|
+ duanxinOrder(e,index){
|
|
|
+ console.log(e);
|
|
|
+ this.activeIndex = index
|
|
|
this.orderId=e.orderId
|
|
|
this.xuePhone=e.phone
|
|
|
this.querenduanxinList()
|
|
|
@@ -805,7 +815,7 @@
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '确认发送短信并完成送达吗?',
|
|
|
- success: function(res) {
|
|
|
+ success: (res)=> {
|
|
|
if (res.confirm) {
|
|
|
uni.showLoading({
|
|
|
title: '加载中',
|
|
|
@@ -818,9 +828,12 @@
|
|
|
}
|
|
|
that.$Request.postT("/admin/order/accomplishOrder", data).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
+ // console.log(this.activeIndex);
|
|
|
+ this.orderList.splice(this.activeIndex,1)
|
|
|
+ this.spliceCount ++
|
|
|
that.alertduanxin=false
|
|
|
that.xuePhone=''
|
|
|
- that.getOrderList()
|
|
|
+ // that.getOrderList()
|
|
|
uni.showToast({
|
|
|
title: '配送成功',
|
|
|
icon: "success"
|
|
|
@@ -1060,6 +1073,7 @@
|
|
|
console.log('用户点击确定');
|
|
|
let data = {
|
|
|
orderId: e.orderId,
|
|
|
+ isAppend:1
|
|
|
// orderNumber: e.orderNumber,
|
|
|
// status: 8
|
|
|
}
|
|
|
@@ -1145,6 +1159,7 @@
|
|
|
this.current = 0
|
|
|
this.current1 = 0
|
|
|
this.status = ''
|
|
|
+ this.spliceCount = 0
|
|
|
this.getOrderList()
|
|
|
},
|
|
|
change(index) {
|
|
|
@@ -1167,6 +1182,7 @@
|
|
|
// #endif
|
|
|
this.page = 1
|
|
|
this.current = index;
|
|
|
+ this.spliceCount = 0
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
this.status = '' //全部
|
|
|
@@ -1225,6 +1241,7 @@
|
|
|
// #endif
|
|
|
this.page = 1
|
|
|
this.current1 = index;
|
|
|
+ this.spliceCount = 0
|
|
|
switch (index) {
|
|
|
case 0:
|
|
|
this.status = ''
|
|
|
@@ -1278,6 +1295,7 @@
|
|
|
title: '加载中···',
|
|
|
mask: true, // 是否显示透明蒙层,防止触摸穿透
|
|
|
})
|
|
|
+ console.log(this.page);
|
|
|
let data = {
|
|
|
page: this.page,
|
|
|
limit: this.limit,
|
|
|
@@ -1317,10 +1335,10 @@
|
|
|
}
|
|
|
},
|
|
|
onReachBottom: function() {
|
|
|
- this.page = this.page + 1;
|
|
|
- this.getOrderList();
|
|
|
-
|
|
|
- if (this.totalCount == this.orderList.length) {
|
|
|
+ if(this.orderList.length < (this.totalCount-this.spliceCount)){
|
|
|
+ this.page ++;
|
|
|
+ this.getOrderList();
|
|
|
+ }else{
|
|
|
uni.showToast({
|
|
|
title: '已经到底了~',
|
|
|
icon: 'none'
|