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

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

@@ -8,6 +8,7 @@
platform: plus.os.name, platform: plus.os.name,
version : plus.runtime.version version : plus.runtime.version
}).then(res => { }).then(res => {
console.log(res)
if (res.update) { if (res.update) {
uni.showModal({ uni.showModal({
title : "更新提示", title : "更新提示",

View File

@@ -2,7 +2,7 @@
"name" : "抖火", "name" : "抖火",
"appid" : "__UNI__C305C03", "appid" : "__UNI__C305C03",
"description" : "", "description" : "",
"versionName" : "1.1.1", "versionName" : "1.1.3",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

View File

@@ -1,7 +1,10 @@
<template> <template>
<view class="content"> <view class="content">
<view class="scheme-item" v-for="(item, index) in list" :key="index"> <view class="scheme-item" v-for="(item, index) in list" :key="index">
<view class="no">{{item.order.order_no}}</view> <view class="no">
<view class="no-text nowrap">{{item.order.order_no}}</view>
<text class="no-status nowrap">{{item.status.text}}</text>
</view>
<view class="scheme-content"> <view class="scheme-content">
<view class="scheme-flex" @click="item.is_show_type = !item.is_show_type"> <view class="scheme-flex" @click="item.is_show_type = !item.is_show_type">
<label>业务类型</label> <label>业务类型</label>
@@ -18,14 +21,6 @@
<view class="item-flex-value">{{citem.price}}</view> <view class="item-flex-value">{{citem.price}}</view>
</view> </view>
</view> </view>
<view class="scheme-flex">
<label>应确认方案</label>
<view class="value nowrap">{{item.confirm.all}}</view>
</view>
<view class="scheme-flex">
<label>应确认方案</label>
<view class="value nowrap">{{item.confirm.confirm}}</view>
</view>
<view class="scheme-flex"> <view class="scheme-flex">
<label>当前方案</label> <label>当前方案</label>
<view class="value nowrap">{{item.institution.title}}<text class="tag">{{item.business_type.title}}</text></view> <view class="value nowrap">{{item.institution.title}}<text class="tag">{{item.business_type.title}}</text></view>
@@ -41,7 +36,7 @@
<view class="user-name">{{item.order.manager.nickname}}</view> <view class="user-name">{{item.order.manager.nickname}}</view>
</view> </view>
<view class="btns"> <view class="btns">
<view class="btns-item" @click="$Router.push({name: 'ConfirmSchemeInfo', params: {schemeId: item.business_order_close_scheme_id}})">确认方案</view> <view class="btns-item" v-if="item.status.value === 1" @click="$Router.push({name: 'ConfirmSchemeInfo', params: {schemeId: item.business_order_close_scheme_id}})">确认方案</view>
</view> </view>
</view> </view>
</view> </view>
@@ -68,6 +63,7 @@
current : 1, current : 1,
has_more: false, has_more: false,
} }
this.$store.commit('setOrderId', this.$Route.query.orderId)
this.getList() this.getList()
}, },
methods: { methods: {
@@ -129,6 +125,17 @@
line-height: 90rpx; line-height: 90rpx;
border-bottom: solid 1rpx #f6f6f6; border-bottom: solid 1rpx #f6f6f6;
font-size: 30rpx; font-size: 30rpx;
display: flex;
justify-content: space-between;
.no-text{
width: calc(100% - 200rpx);
}
.no-status{
width: 200rpx;
text-align: right;
color: $main-color;
font-weight: bold;
}
} }
.scheme-content{ .scheme-content{
padding: 20rpx 30rpx; padding: 20rpx 30rpx;

View File

@@ -117,8 +117,8 @@
title: '提示', title: '提示',
content: res, content: res,
showCancel: false, showCancel: false,
success() { success: () => {
this.$Route.back() this.$Router.back()
} }
}) })
}).catch(err => { }).catch(err => {

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