|
@@ -88,7 +88,7 @@
|
|
|
<view class="admin-button-com middle" v-if="item.sendStatus == '-4'" @click.stop="openExpressPage(item.id)">呼叫跑腿</view>
|
|
<view class="admin-button-com middle" v-if="item.sendStatus == '-4'" @click.stop="openExpressPage(item.id)">呼叫跑腿</view>
|
|
|
<view class="admin-button-com middle" v-else-if="item.sendStatus == '-1'" @click.stop="openExpressPage(item.id)">重叫跑腿</view>
|
|
<view class="admin-button-com middle" v-else-if="item.sendStatus == '-1'" @click.stop="openExpressPage(item.id)">重叫跑腿</view>
|
|
|
<view class="admin-button-com default" v-else-if="item.sendStatus == '5'">跑腿完成</view>
|
|
<view class="admin-button-com default" v-else-if="item.sendStatus == '5'">跑腿完成</view>
|
|
|
- <view class="admin-button-com default" v-else-if="item.sendStatus.includes(['0', '1', '2', '3', '4', '10', '20', '30']) && item.payStatus == 1">已发跑腿</view>
|
|
|
|
|
|
|
+ <view class="admin-button-com default" v-else-if="['0', '1', '2', '3', '4', '10', '20', '30'].includes(item.sendStatus) && item.payStatus == 1">已发跑腿</view>
|
|
|
</block>
|
|
</block>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -222,6 +222,12 @@ export default {
|
|
|
return this.repeat !== -1 || this.shopAdminId !== 0;
|
|
return this.repeat !== -1 || this.shopAdminId !== 0;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onLoad() {
|
|
|
|
|
+ uni.$on('updateOrderStatus', this.updateOrderStatus);
|
|
|
|
|
+ },
|
|
|
|
|
+ onUnload() {
|
|
|
|
|
+ uni.$off('updateOrderStatus', this.updateOrderStatus);
|
|
|
|
|
+ },
|
|
|
onPullDownRefresh () {
|
|
onPullDownRefresh () {
|
|
|
this.resetList();
|
|
this.resetList();
|
|
|
this.getOrderList().then(res => {
|
|
this.getOrderList().then(res => {
|
|
@@ -308,7 +314,6 @@ export default {
|
|
|
if(this.searchStyle == 0){
|
|
if(this.searchStyle == 0){
|
|
|
// 首次点击搜索框:searchText 为空,lastSearchText 也为空 → 跳过搜索
|
|
// 首次点击搜索框:searchText 为空,lastSearchText 也为空 → 跳过搜索
|
|
|
if (this.$util.isEmpty(this.searchText) && this.$util.isEmpty(this.lastSearchText)) {
|
|
if (this.$util.isEmpty(this.searchText) && this.$util.isEmpty(this.lastSearchText)) {
|
|
|
- // console.log('000001')
|
|
|
|
|
return;
|
|
return;
|
|
|
} else {
|
|
} else {
|
|
|
// console.log('000002')
|
|
// console.log('000002')
|
|
@@ -317,9 +322,7 @@ export default {
|
|
|
if(that.$util.isEmpty(e)){
|
|
if(that.$util.isEmpty(e)){
|
|
|
that.showSearch = false
|
|
that.showSearch = false
|
|
|
that.searchList = []
|
|
that.searchList = []
|
|
|
- // console.log('111 空 111')
|
|
|
|
|
}else{
|
|
}else{
|
|
|
- // console.log('222222')
|
|
|
|
|
this.lastSearchText = this.searchText;
|
|
this.lastSearchText = this.searchText;
|
|
|
getList({ page:1, name:e, type:0}).then((res) => {
|
|
getList({ page:1, name:e, type:0}).then((res) => {
|
|
|
if (!that.$util.isEmpty(res.data) && !that.$util.isEmpty(res.data.list)){
|
|
if (!that.$util.isEmpty(res.data) && !that.$util.isEmpty(res.data.list)){
|
|
@@ -332,15 +335,12 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- // console.log('333333')
|
|
|
|
|
// 首次点击搜索框:searchText 为空,lastSearchText 也为空 → 跳过搜索
|
|
// 首次点击搜索框:searchText 为空,lastSearchText 也为空 → 跳过搜索
|
|
|
if (this.$util.isEmpty(this.searchText) && this.$util.isEmpty(this.lastSearchText)) {
|
|
if (this.$util.isEmpty(this.searchText) && this.$util.isEmpty(this.lastSearchText)) {
|
|
|
- // console.log('33333-空')
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (this.searchText === this.lastSearchText) {
|
|
if (this.searchText === this.lastSearchText) {
|
|
|
- // console.log('33333-111')
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -477,6 +477,15 @@ export default {
|
|
|
this.getOrderList();
|
|
this.getOrderList();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ updateOrderStatus(orderId) {
|
|
|
|
|
+ if (this.list && this.list.data) {
|
|
|
|
|
+ const item = this.list.data.find(item => item.id == orderId);
|
|
|
|
|
+ if (item) {
|
|
|
|
|
+ item.status = 3;
|
|
|
|
|
+ item.sendStatus = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 打开配送页面
|
|
* 打开配送页面
|
|
|
*/
|
|
*/
|