耀实惠小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

291 lines
6.4 KiB

<template>
<view>
<!-- <u-tabs font-size="34" barWidth="83" :current="current" :scrollable="false" :list="nav_tabs" @change="tabsCilck"></u-tabs> -->
<u-tabs :list="nav_tabs" :is-scroll="false" :current="current" @change="tabsCilck"></u-tabs>
<!-- 信息展示 -->
<view class="order_box">
<view class="item" v-if="list.length !==0" v-for="(item,index) in list" :key="index">
<view class="time">
<text class="time_text">{{item.createTime}}</text>
<!-- <text class="phone" @click="call">一键拨号 &nbsp;&nbsp;(13545625412)</text> -->
</view>
<view class="">
<u-read-more :toggle="true" showHeight="900" color="#6C6C6C" textIndent="0" fontSize="24rpx" closeText="展开(共5件)" openText="收起">
<view class="goods_item">
<image :src="item.dbOrderDetail.goodPic.split(',')[0]" mode=""></image>
<view class="right_box">
<text class="title">{{item.goodId_dictText}}</text>
<view class="center_box">
<view class="money_box">
<text class="min red"></text>
<text class="bigs red">{{item.dbOrderDetail.goodPrice}}</text>
</view>
<text>×{{item.dbOrderDetail.goodNum}}</text>
</view>
<text>{{item.dbOrderDetail.goodSku}}</text>
</view>
</view>
</u-read-more>
<!-- <view class="total_box">
<text>合计</text>
<text>12346</text>
</view> -->
<button class="gather" v-if="current==0">审核中</button>
<view class="btn_gather" v-if="current==1">
<!-- <button class="gather">修改防疫信息</button> -->
<button class="gather" @click="tosetInfo(item)">修改处方信息</button>
</view>
<button class="gather" v-if="current==2" @click="toShopingPages">去购买</button>
</view>
</view>
<!-- 已收货 图片 -->
<view class="empty_box" v-else>
<image :src="IMG_URL+'empty.png'" alt=""></image>
<text class="text_">暂无订单记录</text>
</view>
</view>
</view>
</template>
<script>
import { IMG_URL } from '@/env.js'
export default {
data() {
return {
IMG_URL,
current: 0,
nav_tabs: [{
name: '审核中',
}, {
name: '待修改',
}, {
name: '已通过',
}],
list: [],
pageNo: 1,
pageSize: 10
}
},
onPullDownRefresh() {
uni.showLoading();
this.pageNo = 1,
this.pageSize = 10,
this.isMore = 1;
this.getList();
},
onReachBottom() {
if (this.isMore == 3 || this.isMore == 2) return
this.pageNo+=1;
this.isMore = 2;
this.getList();
},
onLoad () {
this.getList();
},
onUnload() {
const pagelist = getCurrentPages();
console.log(pagelist)
if(pagelist[pagelist.length-2].route == '/pagesC/confirmOrder/confirmOrder'){
uni.switchTab({
url: '/pages/my/my'
})
}
},
methods: {
//${id}&medicineMan=${medicineMan}
tosetInfo(item) {
console.log("点击出现的数据")
console.log(item)
uni.navigateTo({
url:'/pagesC/subscribe/subscribe?&goodsId='+item.goodId
});
},
toShopingPages() {
uni.navigateTo({
url: "/pages/my/order/index?status=0"
})
},
tabsCilck(index) {
this.list = [];
console.log(index)
this.current = index
this.getList();
},
getList () {
this.$api('getOrderYyList', { state: this.current ,pageNo: this.pageNo, pageSize: this.pageSize, })
.then(res => {
let { code, result, message } = res;
uni.stopPullDownRefresh()
if (code === 200) {
this.isMore = result.records.length >= this.pageSize ? 1 : 3
this.list = this.pageNo > 1 ? this.list.concat(result.records) : result.records
uni.hideLoading();
} else {
this.isMore = 3
this.$Toast(message);
uni.hideLoading();
}
})
.catch(err => {
this.isMore = 3
uni.stopPullDownRefresh()
this.$Toast(err.message);
});
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .u-scroll-box {
display: flex;
}
.empty_box{
width: 100%;
height: 80vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
image{
width: 371rpx;
height: 371rpx;
}
.text_{
margin-top: 10rpx;
font-size: 36rpx;
font-weight: bold;
color: #01AEEA;
}
}
.order_box {
margin-top: 22rpx;
padding-bottom: 20rpx;
.item {
width: 711rpx;
margin: 0 auto;
border-radius: 24rpx;
padding-bottom: 21rpx;
box-shadow: 0 3rpx 6rpx 0 rgba(0, 0, 0, 0.16);
.time{
width: 648rpx;
margin: 0 auto;
padding-top: 34rpx;
padding-bottom: 15rpx;
border-bottom: 1px solid rgba(112,112,112,0.2);
display: flex;
justify-content: space-between;
font-size: 32rpx;
.time_text {
color: #333;
}
.phone{
color: #01AEEA;
}
}
.goods_item{
display: flex;
width: 648rpx;
margin: 0 auto;
margin-top: 22rpx;
padding-bottom: 26rpx;
border-bottom: 1px solid #707070;
&:last-child{
border-bottom: none;
}
image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
}
.right_box{
display: flex;
flex-direction: column;
font-size: 26rpx;
margin-left: 25rpx;
.title{
color: #000;
font-size: 33rpx;
line-height: 39rpx;
}
.center_box{
display: flex;
justify-content: space-between;
color: #01AEEA;
font-size: 32rpx;
.money_box{
.red{
color: #DB0618;
}
.min{
font-size: 20rpx;
}
.bigs{
font-size: 36rpx;
}
}
}
}
}
.total_box{
display: flex;
width: 648rpx;
margin: 0 auto;
justify-content: flex-end;
font-size: 36rpx;
margin-top: 34rpx;
padding-bottom: 16rpx;
border-bottom: 1px solid rgba(112,112,112,0.2);
text{
&:last-child{
color: #DB0618;
}
}
}
.btn_gather{
display: flex;
justify-content: flex-end;
button{
margin: 0;
height: 60rpx;
margin-top: 20rpx;
&:nth-child(1){
margin-right: 10rpx;
}
}
}
.gather{
width: 255rpx;
height: 60rpx;
margin-top: 23rpx;
margin-right: 21rpx;
border: 1rpx solid #01AEEA;
color: #01AEEA;
font-size: 30rpx;
border-radius: 30rpx;
line-height: 60rpx;
}
}
position: relative;
.received{
position: absolute;
top: 18rpx;
right: 122rpx;
width: 181rpx;
height: 108rpx;
}
}
</style>