调整订单列表,调整确认方案显示问题

This commit is contained in:
唐明明
2023-01-04 16:13:43 +08:00
parent 5dd934729e
commit 0755575f08
5 changed files with 60 additions and 20 deletions

View File

@@ -77,11 +77,13 @@
<view class="btns-item btns-border" v-if="item.status.value == 5" @click="$Router.push({name: 'WorkPerfectChoose', params: {orderId: item.business_order_id, type: 'perfect'}})">完善</view>
<view class="btns-item btns-border" v-if="item.status.value == 6" @click="$Router.push({name: 'WorkPerfectChoose', params: {orderId: item.business_order_id }})">查看资料</view>
<!-- type: 'perfect' -->
<view class="btns-item btns-border" v-if="item.status.value == 9 && item.is_my" @click="$Router.push({name: 'ConfirmScheme', params: {orderId: item.business_order_id,}})">去确认</view>
<view class="btns-item btns-border" v-if="item.can.confirm && item.is_my" @click="$Router.push({name: 'ConfirmScheme', params: {orderId: item.business_order_id,}})">去确认</view>
<view class="btns-item" @click="$Router.push({name: 'OrderInfo', params: {orderId: item.business_order_id}})">查看</view>
</view>
</view>
</view>
<!-- 分页 -->
<u-loadmore v-if="pagesShow" :status="status" />
</view>
<!-- 订单是空的 -->
<view class="order-null" v-else>
@@ -130,6 +132,14 @@
actionLevels: [],
getSignState: false,
getNextTab : false,
// 分页
page : {
current : 1,
has_more: false,
},
pagesShow : false,
status : ''
};
},
created() {
@@ -152,7 +162,6 @@
this.tabType = this.tabs[this.tabsCurrent].val
this.getList()
this.getNextTab = false;
this.$store.commit('setOrderId', null)
return
}
this.getList()
@@ -164,6 +173,8 @@
onTabs(e){
this.tabsCurrent = e.index
this.tabType = e.val
this.page = { current: 1, has_more: false }
this.orders = []
this.getList()
},
// 变更当前列表状态
@@ -177,15 +188,27 @@
},
// 获取列表
getList(){
this.$store.commit('setOrderId', null)
uni.showLoading({
title: '加载中...',
mask : true
})
if(this.$store.getters.getOrderId != null){
this.page = { current: 1, has_more: false }
this.$store.commit('setOrderId', null)
}
lists({
status: this.tabType
status: this.tabType,
page : this.page.current
}).then(res => {
let { data } = res;
let { data, page } = res;
data.map(val => {
val.is_show_type = false
})
this.orders = data
let atList = page.current == 1 ? [] : this.orders
this.orders = atList.concat(data)
this.page = page
this.pagesShow = false
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
@@ -195,7 +218,6 @@
},
// 获取转让对象
onTransfers(index, item){
console.log(index)
levels(item.business_order_id).then(res => {
let ActionSheet = []
for(let key in res){
@@ -313,6 +335,16 @@
phoneNumber: phone
})
}
},
onReachBottom() {
this.pagesShow = true;
if(this.page.has_more){
this.status = 'loading';
this.page.current++
this.getList()
return
}
this.status = 'nomore';
}
}
</script>