syt 1 year ago
commit 4e0b7946da
  1. 254
      pages/news/recycling/confirm1.vue
  2. 14
      pages/news/recycling/order.vue
  3. 7
      pages/news/recycling/orderList.vue
  4. 30
      pages/news3/seasoningCondimentsRecord.vue
  5. 31
      pages/order/detail.vue
  6. 279
      pages/order/index.vue
  7. 2
      pages/user/index.vue

@ -1,7 +1,7 @@
<template>
<view class="recycling">
<view class="recycling-hd">
<image :src="$picUrl+'/static/news/recyling-banner-01'"></image>
<image :src="$picUrl+'/static/news/recyling-banner-01.png'"></image>
</view>
<view class="recycling-bd">
<view class="tab">
@ -76,9 +76,11 @@
<view class="b">
<input class="box1" v-model="obj.username" type="text" placeholder="联系人姓名" />
<view class="radio">
<u-radio-group v-model="obj.sex" active-color="red">
<u-radio name="先生" lable='1'>先生</u-radio>
<u-radio name="女士" lable='2'>女士</u-radio>
<u-radio-group v-model="sexValue" active-color="red">
<u-radio @change="radioChange" v-for="(item, index) in sexList" :key="index"
:name="item.name">
{{item.name}}
</u-radio>
</u-radio-group>
</view>
</view>
@ -114,20 +116,19 @@
<input class="box" v-model="obj.expect_price" type="number" placeholder="请输入您期待的售卖价格(元)" />
</view>
</view>
<view class="photo">
<view class="file_img" v-for="(image, imageIndex) in imageList" :key="imageIndex">
<text class="image-delete iconfont icon-shanchu" @click="deleteImage(imageIndex)"></text>
<image :src="image.path"></image>
</view>
<view @click="chooseImage" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image src="/static/news/icon-upload.png"></image>
<view class="1">上传图片</view>
<view class="1">{{imageList.length>0?imageList.length:0}}/{{maxImageLength}}</view>
</view>
<view class="c">
<u-upload :action="action" :header="header" @on-uploaded="onSuccess" @on-remove="onRemove"
width="180" height="180" :file-list="fileList" :custom-btn="true" max-count="6">
<template v-slot:addBtn>
<view class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
<image :src="$picUrl+'/static/news/icon-upload.png'"></image>
<view class="1">上传图片</view>
</view>
</template>
</u-upload>
</view>
<view class="remark">
<view class="name">备注 </view>
<view class="name">留言 </view>
<view class="xu">
<view class="li" @click="openPage(5,'可提前来')">可提前来</view>
<view class="li" @click="openPage(5,'来之前打电话')">来之前打电话</view>
@ -180,7 +181,16 @@
show: false,
storeInfo: {},
region: [],
url: Config.get('apiUrl') + 'user/upload',
sexValue: '女士',
sexList: [{
name: '先生',
value: 1
},
{
name: '女士',
value: 2
},
],
obj: {
recovery_id: '', //ID
shop_id: '', //ID
@ -199,67 +209,118 @@
express_no: '', //
image_ids: '', //ID()
},
imageList: [],
maxImageLength: 6
source: 1,
action: '',
header: '',
fileList: [],
handleList: [],
}
},
onReady() {
this.action = (Config.get('apiUrl') + 'upload/image').replace("index.php?s=/", "")
this.header = {
'Storeid': uni.getStorageSync('Store').storeInfo.store_id,
'Access-Token': uni.getStorageSync('AccessToken'),
'platform': "MP-WEIXIN",
}
},
onLoad(op) {
this.tabIndex = op.tabIndex;
this.source = op.source;
this.order_id = op.order_id || '';
this.info = uni.getStorageSync("getInfo")
this.storeInfo = uni.getStorageSync("storeHsInfo")
if (op.infor) {
this.info = op.infor ? JSON.parse(op.infor) : ''
this.obj = op.infor ? JSON.parse(op.infor) : this.obj
if (this.source == 2) {
this.getOrderDetail(op.order_id)
}
},
methods: {
//
deleteImage(imageIndex) {
this.imageList.splice(imageIndex, 1)
radioChange(e) {
this.sexValue = e
this.obj.sex = e == '先生' ? 1 : 2
},
//
chooseImage() {
const app = this
const oldImageList = app.imageList
//
uni.chooseImage({
count: app.maxImageLength - oldImageList.length,
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success({
tempFiles
}) {
app.imageList = oldImageList.concat(tempFiles)
}
async getOrderDetail(order_id) {
let {
status,
message,
data
} = await newFunApi.orderDetail({
order_id: order_id
});
if (status == 200) {
this.info = data.detail;
this.storeInfo = data.detail.shop_info
this.sexValue = data.detail == 1 ? '先生' : '女士'
this.obj = data.detail;
if (this.obj.images_list.length > 0) {
this.obj.images_list.forEach(item => {
item.url = item.external_url
});
this.fileList = this.obj.images_list
}
}
},
//
onSuccess(list) {
let nList = []
list.forEach(item => {
if (item.response) {
nList.push(item)
}
});
list = nList
if (list.length > 0) {
const {
response
} = list[0];
if (response.status == 200) {
uni.showToast({
title: "上传成功"
})
if (this.source == 2) {
this.handleList = []
list.forEach(item => {
this.handleList.push(item.response.data.fileInfo)
});
} else {
this.obj.image_ids = this.handleRemove('', list);
}
//
uploadFile() {
const app = this
const {
imageList
} = app
//
return new Promise((resolve, reject) => {
if (imageList.length > 0) {
UploadApi.image(imageList)
.then(fileIds => {
app.obj.image_ids = fileIds;
resolve(fileIds)
})
.catch(reject)
}
}
},
onRemove(file, fileList) {
if (this.source == 2) {
this.handleList = [];
if (fileList.length > 0) {
fileList.forEach((item, index) => {
if (item.response) {
this.handleList.push(item.response.data.fileInfo)
} else {
this.fileList.splice(file, 1)
}
});
} else {
resolve()
this.fileList.splice(file, 1)
}
})
} else {
this.obj.image_ids = this.handleRemove(file, fileList);
}
},
handleRemove: function(file, fileList) {
let idList = []
fileList.forEach(item => {
idList.push(item.response.data.fileInfo.file_id)
});
return idList.join(',')
},
tabItem(i) {
this.tabIndex = i
},
confirm(e) {
this.obj.server_time = e.year + "-" + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ':' + e
this.obj.server_time = e.year + "-" + e.month + '-' + e.day + " " + e.hour + ":" + e.minute + ':' +
e
.second
},
changeRegion(e) {
@ -285,6 +346,15 @@
this.show = true
}
if (i == 4) { //
if (this.source == 2) {
let trList = []
this.fileList = this.fileList.concat(this.handleList);
this.fileList.forEach(item => {
trList.push(item.file_id)
});
this.obj.image_ids = trList.join(',');
}
console.log(this.obj.image_ids)
if (this.tabIndex == 0) {
this.obj.recovery_type = 20
}
@ -370,8 +440,14 @@
return
}
}
this.uploadFile()
newFunApi.addOrder(this.obj).then(res => {
let url = '';
if (this.source == 2) {
url = newFunApi.updateOrder(this.obj)
} else {
url = newFunApi.addOrder(this.obj)
}
url.then(res => {
if (res.status == 200) {
this.isShow = true
} else {
@ -611,6 +687,7 @@
font-size: 28rpx;
font-weight: 400;
color: #313131;
margin-top: 15rpx;
}
.xu {
@ -788,37 +865,38 @@
}
}
}
.photo {
display: flex;
justify-content: flex-start;
padding: 20rpx 0;
overflow: hidden;
}
.file_img {
.c {
padding-top: 20rpx;
overflow: hidden;
position: relative;
image {
width: 80px;
height: 80px;
margin-right: 10rpx;
}
.slot-btn {
width: 180rpx;
height: 180rpx;
background: #F6F6F6;
border-radius: 10rpx;
border: 1px solid #C0C0C0;
text-align: center;
font-size: 28rpx;
font-weight: 500;
color: #6D6D6D;
.image-delete {
position: absolute;
top: -10rpx;
right: -10rpx;
height: 42rpx;
width: 42rpx;
background: rgba(0, 0, 0, 0.64);
border-radius: 50%;
color: #fff;
font-weight: bolder;
font-size: 22rpx;
z-index: 10;
display: flex;
justify-content: center;
align-items: center;
.l {
line-height: 30rpx;
}
image {
width: 50rpx;
height: 50rpx;
display: block;
margin: 0 auto;
margin-top: 30rpx;
}
}
}
::v-deep .u-list-item {
width: 180rpx !important;
height: 180rpx !important;
}
</style>

@ -34,15 +34,11 @@
<view class="l">回收时间</view>
<view class="r">{{infor.server_time}}</view>
</view>
<view class="item">
<view class="l">期待价格</view>
<view class="r">¥{{infor.expect_price}}</view>
</view>
<view class="items" v-if="infor &&infor.images_list.length>0">
<view class="l">商品图片</view>
<view class="r">
<view class="pic">
<image :src="i" v-for="i in infor.images_list" :key="i"></image>
<image :src="i.external_url" v-for="i in infor.images_list" :key="i"></image>
</view>
</view>
</view>
@ -101,7 +97,7 @@
<view class="r">
<input type="text" disabled v-model="express_name" placeholder="请选择物流公司" />
</view>
<view class="m red" v-if="infor.express_name==''">
<view class="m red" v-if="infor.express_no==''">
<picker @change="changeOption" mode="selector" range-key="express_name" :value="index"
:range="expressList">
<u-icon style="color:#999" name="arrow-right"></u-icon>
@ -115,7 +111,7 @@
<input type="text" :disabled='infor.express_no?true:false' v-model="express_no"
placeholder="请输入物流单号" />
</view>
<view class="m red" @click="onSend" v-if="infor.express_name==''">
<view class="m red" @click="onSend" v-if="infor.express_no==''">
<view class="btn">确认发货</view>
</view>
</view>
@ -129,7 +125,7 @@
</view>
</view>
</view>
<view class="order-fd">
<view class="order-fd" v-if="infor.order_status==10">
<view class="a">
联系商家
</view>
@ -500,7 +496,7 @@
.r {
width: 100%;
overflow: hidden;
margin-top: 20rpx;
margin-top: 5rpx;
.pic {
width: 110%;

@ -116,7 +116,7 @@
confirmColor: "#F21A1C",
complete(res) {
if (res.confirm) {
that.toDel(index, a.recovery_id);
that.toDel(index, a.order_id);
}
}
})
@ -128,7 +128,7 @@
}
if (i == 3) {
uni.navigateTo({
url: '/pages/news/recycling/confirm1?infor=' + JSON.stringify(a)+'&tabIndex='+(a.recovery_type==10?1:a.recovery_type==20?0:2)
url: '/pages/news/recycling/confirm1?order_id=' + a.order_id+'&tabIndex='+(a.recovery_type==10?1:a.recovery_type==20?0:2)+'&source=2'
})
}
if (i == 4) {
@ -173,7 +173,8 @@
uni.showToast({
title: "取消成功"
})
this.getList(1)
this.classifyShow=2
this.getOrderList(1)
}
},
/**

@ -236,11 +236,33 @@
url: "/pages/news3/LogisticsDetails?logisticsNum=" + this.form.express_no
})
},
onRemoveTransfer(index) {
this.transferList.splice(index, 1)
onRemoveTransfer(file, fileList) {
if (fileList.length > 0) {
this.handleList = []
fileList.forEach((item, index) => {
if (item.response) {
this.handleList.push(item.response.data.fileInfo)
} else {
this.transferList.splice(file, 1)
}
});
} else {
this.transferList.splice(file, 1)
}
},
onRemoveChat(index) {
this.chatList.splice(index, 1)
onRemoveChat(file, fileList) {
if (fileList.length > 0) {
this.handChatList = []
fileList.forEach((item, index) => {
if (item.response) {
this.handChatList.push(item.response.data.fileInfo)
} else {
this.chatList.splice(file, 1)
}
});
} else {
this.chatList.splice(file, 1)
}
},
//
transferSuccess(list) {

@ -247,7 +247,8 @@
</view>
<view v-if="menushow" class="menuarea">
<view class="menulist">
<view class="" @click="onInvoicing(order.order_id)" v-if="order.order_status == OrderStatusEnum.COMPLETED.value">
<view class="" @click="onInvoicing(order.order_id)"
v-if="order.order_status == OrderStatusEnum.COMPLETED.value">
申请开票
</view>
<view class="" @click="onDelete(order.order_id)"
@ -262,17 +263,17 @@
</view>
<view class="footer">
<view class="meetPrice" @click="changeMenu"
v-if="order.order_status == OrderStatusEnum.COMPLETED.value || order.pay_status == PayStatusEnum.PENDING.value">
v-if="order.order_status == OrderStatusEnum.COMPLETED.value || (order.pay_status == PayStatusEnum.PENDING.value&&order.order_status == OrderStatusEnum.NORMAL.value)">
更多
</view>
<view v-else style="color: #fff;">-</view>
<view class="fooRight">
<view class="buyAgain" @click="handleTargetGoods(order.goods[0].goods_id)"
v-if="order.pay_status == PayStatusEnum.SUCCESS.value && order.delivery_status == ReceiptStatusEnum.NOT_RECEIVED.value">
v-if="(order.pay_status == PayStatusEnum.SUCCESS.value && order.delivery_status == ReceiptStatusEnum.NOT_RECEIVED.value)||order.order_status == OrderStatusEnum.CANCELLED.value">
再次购买
</view>
<view class="buyAgain" @click="onPay(order.order_id)"
v-if="order.pay_status == PayStatusEnum.PENDING.value">
v-if="order.pay_status == PayStatusEnum.PENDING.value &&order.order_status == OrderStatusEnum.NORMAL.value">
继续付款
</view>
<view class="buyAgain" @click="onExtractQRCode(order.order_id)" v-if="order.pay_status == PayStatusEnum.SUCCESS.value && order.delivery_type == DeliveryTypeEnum.EXTRACT.value
@ -284,6 +285,7 @@
查看物流
</view>
<view class="buyAgain" @click="onReceipt(order.order_id)"
style="color:#fff;background: linear-gradient( 180deg, #FD5D06 0%, #F3211A 100%);"
v-if="order.delivery_status == DeliveryStatusEnum.DELIVERED.value && order.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value">
确认收货
</view>
@ -486,8 +488,8 @@
//
handleTargetGoods(goodsId) {
this.$navTo('pages/goods/detail', {
goodsId
uni.redirectTo({
url: 'pages/goods/detail?goodsId=' + goodsId //
})
},
//
@ -499,7 +501,8 @@
//
onInvoicing(orderId) {
uni.navigateTo({
url: '/pages/invoice/edit?orderId=' + orderId + '&source=' + 0 + "&order=" + JSON.stringify(this
url: '/pages/invoice/edit?orderId=' + orderId + '&source=' + 0 + "&order=" + JSON.stringify(
this
.order)
})
},
@ -736,12 +739,11 @@
.sendHome {
width: 694rpx;
height: 218rpx;
background: #FFFFFF;
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
margin: 14rpx 0 0 26rpx;
padding: 18rpx 16rpx 16rpx 34rpx;
padding: 34rpx 20rpx 25rpx 34rpx;
.fline {
width: 100%;
@ -795,7 +797,8 @@
.sl {
width: 474rpx;
height: 68rpx;
// height: 68rpx;
margin-bottom: 20rpx;
font-size: 24rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
@ -918,7 +921,7 @@
opacity: 1;
image {
width: 100%;
width: 162rpx;
height: 100%;
}
}
@ -937,7 +940,7 @@
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
width: 420rpx;
width: 310rpx;
}
.goodsPrice {
@ -1031,7 +1034,7 @@
border-radius: 10rpx 10rpx 10rpx 10rpx;
opacity: 1;
margin: 12rpx 0 0 26rpx;
padding: 22rpx 36rpx 50rpx 24rpx;
padding: 22rpx 36rpx 35rpx 24rpx;
.orderTitle {
position: relative;
@ -1079,7 +1082,7 @@
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 20rpx;
margin-top: 30rpx;
.share {
image {

@ -1,112 +1,103 @@
<template>
<view class="order" :style="appThemeStyle">
<mescroll-body ref="mescrollRef" :sticky="true" @init="mescrollInit" :down="{ native: true }"
@down="downCallback" :up="upOption" @up="upCallback">
<view class="search">
<view class="box">
<u-icon name="search" size="30" color="#8D8D8D"></u-icon>
<input type="search" @confirm="confirm" v-model='keyWords' placeholder="搜索订单" />
</view>
<view class="search">
<view class="box">
<u-icon name="search" size="30" color="#8D8D8D"></u-icon>
<input type="search" @confirm="confirm" v-model='keyWords' placeholder="搜索订单" />
</view>
<!-- tab栏 -->
<u-tabs :list="tabs" bg-color="#fafafa" :is-scroll="true" height="120" font-size="32" :current="curTab"
bar-width="56" bar-height="6" active-color="#3B3B3B" :show-bar='true' :duration="0.2"
@change="onChangeTab" />
<!-- 订单列表 -->
<view class="order-list">
<view class="item" v-for="(item,index) in list" v-if="list.length>0">
<view class="hd">
<view class="a">
<image class="icon" :src="item.storeInfo.image_url"></image>
{{item.storeInfo.store_name}}
</view>
<view class="b"
:style="{'color': (item.order_status == OrderStatusEnum.COMPLETED.value)?'#3E801D':'#F21A1C'}">
{{item.state_text}}
</view>
</view>
<!-- tab栏 -->
<u-tabs :list="tabs" bg-color="#fafafa" :is-scroll="true" height="120" font-size="32" :current="curTab"
bar-width="56" bar-height="6" active-color="#3B3B3B" :show-bar='true' :duration="0.2"
@change="onChangeTab" />
<!-- 订单列表 -->
<view class="order-list">
<view class="item" v-for="(item,index) in list" v-if="list.length>0">
<view class="hd">
<view class="a">
<image class="icon" :src="item.storeInfo.image_url"></image>
{{item.storeInfo.store_name}}
</view>
<view class="bd" @click="goOrderDetail(item.order_id)" v-for="(goods, idx) in item.goods"
:key="idx">
<view class="pic">
<image :src="goods.goods_image"></image>
</view>
<view class="info">
<view class="a">{{ goods.goods_name }}</view>
<view class="b">
<text>{{ goods.is_user_grade ? goods.grade_goods_price : goods.goods_price }}</text>
</view>
</view>
<view class="num">
x{{ goods.total_num }}
</view>
<view class="b"
:style="{'color': (item.order_status == OrderStatusEnum.COMPLETED.value)?'#3E801D':'#F21A1C'}">
{{item.state_text}}
</view>
<view class="fd">
{{ item.total_num }}件商品实付款<text>{{ item.pay_price }}</text>
</view>
<view class="bd" @click="goOrderDetail(item.order_id)" v-for="(goods, idx) in item.goods" :key="idx">
<view class="pic">
<image :src="goods.goods_image"></image>
</view>
<!-- <view class="receive">
<view class="">
收件人姓名 188989988900
<view class="info">
<view class="a">{{ goods.goods_name }}</view>
<view class="b">
<text>{{ goods.is_user_grade ? goods.grade_goods_price : goods.goods_price }}</text>
</view>
<view style="color: #939393;margin-top: 12rpx;">
这里是备注
</view>
<view class="num">
x{{ goods.total_num }}
</view>
</view>
<view class="fd">
{{ item.total_num }}件商品实付款<text>{{ item.pay_price }}</text>
</view>
<view v-if="item.menushow" class="menuarea">
<view class="mask" @click="changeMenu(index)">
</view>
<view class="menulist">
<view class="" v-if="item.order_status == OrderStatusEnum.COMPLETED.value"
@click="onInvoicing(item.order_id,item)">
申请开票
</view>
</view> -->
<view v-if="item.menushow" class="menuarea">
<view class="mask" @click="changeMenu(index)">
<view class="" @click="onDelete(item.order_id)"
v-if="item.order_status == OrderStatusEnum.COMPLETED.value">
删除订单
</view>
<view class="menulist">
<view class="" v-if="item.order_status == OrderStatusEnum.COMPLETED.value"
@click="onInvoicing(item.order_id,item)">
申请开票
</view>
<view class="" @click="onDelete(item.order_id)"
v-if="item.order_status == OrderStatusEnum.COMPLETED.value">
删除订单
</view>
<view class="" v-if="item.pay_status == PayStatusEnum.PENDING.value"
@click="onCancel(item.order_id)">
取消订单
</view>
<view class="" v-if="item.pay_status == PayStatusEnum.PENDING.value"
@click="onCancel(item.order_id)">
取消订单
</view>
<view class="trangle"></view>
</view>
<view class="btn">
<view class="a" @click="changeMenu(index)"
v-if="item.order_status == OrderStatusEnum.COMPLETED.value || item.pay_status == PayStatusEnum.PENDING.value">
更多</view>
<view class="b">
<view class="n" v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_type == DeliveryTypeEnum.EXTRACT.value
<view class="trangle"></view>
</view>
<view class="btn">
<view class="a" @click="changeMenu(index)"
v-if="item.order_status == OrderStatusEnum.COMPLETED.value || (item.pay_status == PayStatusEnum.PENDING.value&&item.order_status == OrderStatusEnum.NORMAL.value)">
更多</view>
<view class="b">
<view class="n" v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_type == DeliveryTypeEnum.EXTRACT.value
&& item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onExtractQRCode(item.order_id)">核销码
</view>
<view class="n" v-if="item.pay_status == PayStatusEnum.PENDING.value"
@click="onPay(item.order_id)">去支付</view>
<view class="n" v-if="item.delivery_status == DeliveryStatusEnum.DELIVERED.value"
@click="onLogistics(item.order_id)">查看物流
</view>
<view class="n n-1"
v-if="item.delivery_status == DeliveryStatusEnum.DELIVERED.value && item.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value"
@click="onReceipt(item.order_id)">确认收货</view>
<view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onCdDia(item.goods_id)">催发货</view>
@click="onExtractQRCode(item.order_id)">核销码
</view>
<view class="n" v-if="item.pay_status == PayStatusEnum.PENDING.value && item.order_status == OrderStatusEnum.NORMAL.value"
@click="onPay(item.order_id)">继续付款</view>
<view class="n" v-if="item.delivery_status == DeliveryStatusEnum.DELIVERED.value"
@click="onLogistics(item.order_id)">查看物流
</view>
<view class="n n-1"
v-if="item.delivery_status == DeliveryStatusEnum.DELIVERED.value && item.receipt_status == ReceiptStatusEnum.NOT_RECEIVED.value"
@click="onReceipt(item.order_id)">确认收货</view>
<view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onCancel(item.order_id)">
取消订单
</view>
<!-- <view class="n"
v-if="(item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == ReceiptStatusEnum.NOT_RECEIVED.value)||item.order_status == OrderStatusEnum.CANCELLED.value"
@click="handleTargetGoods(item.goods[0].goods_id)">再次购买</view>
<view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onCdDia(item.goods_id)">催发货</view>
<view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onCancel(item.order_id)">
取消订单
</view>
<!-- <view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onAdress(order.goods_id)">修改地址</view> -->
<!-- <view class="n n-1"
<!-- <view class="n n-1"
v-if="item.order_status == OrderStatusEnum.COMPLETED.value && item.is_comment == 0"
@click="handleTargetComment(item.order_id)">评价</view> -->
</view>
</view>
</view>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
</view>
</mescroll-body>
<u-empty text="暂无数据显示哦~" v-else mode="list"></u-empty>
</view>
<u-modal v-model="deleteShow" :show-cancel-button="true" :closable='false' @on-cancel="handleCancel"
@on-ok="handleOk" title="确认删除订单?" confirm-color="#F55349">
<view class="slot-content order-modal">
@ -212,23 +203,9 @@
//
list: [],
keyWords: '',
//
upOption: {
//
auto: true,
// ; 10
page: {
size: pageSize
},
// 4
noMoreSize: 4,
//
empty: {
tip: '亲,暂无订单记录'
}
},
total: 1,
pageNum: 1,
// onShow
canReset: false,
//
showQRCodePopup: false,
// url ()
@ -242,6 +219,7 @@
onLoad(options) {
//
this.initCurTab(options)
this.getOrderList();
},
/**
@ -250,9 +228,8 @@
onShow() {
// :
uni.$on('syncRefresh', canReset => {
this.onRefreshList()
this.getOrderList()
})
this.canReset = false
},
/**
@ -262,11 +239,16 @@
//
uni.$off('syncRefresh')
},
onReachBottom() {
if (this.list.length <= this.total) {
this.pageNum++;
this.getOrderList();
}
},
methods: {
confirm() {
//
app.onRefreshList()
app.getOrderList()
},
changeMenu(index) {
this.list[index].menushow = !this.list[index].menushow
@ -283,53 +265,27 @@
}
},
/**
* 上拉加载的回调 (页面初始化时也会执行一次)
* 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10
* @param {Object} page
/**
* 获取列表
*/
upCallback(page) {
const app = this
//
app.getOrderList(page.num)
.then(list => {
const curPageLen = list.data.length
const totalSize = list.data.total
app.mescroll.endBySize(curPageLen, totalSize)
})
.catch(() => app.mescroll.endErr())
},
//
getOrderList(pageNo = 1) {
const app = this
return new Promise((resolve, reject) => {
OrderApi.list({
dataType: app.getTabValue(),
page: pageNo,
keyword: app.keyWords
}, {
load: false
})
.then(result => {
//
const newList = app.initList(result.data.list)
app.list = getMoreListData(newList, app.list, pageNo)
resolve(newList)
})
async getOrderList() {
uni.showLoading({
title: "加载中"
})
},
//
initList(newList) {
newList.data.forEach(item => {
item.menushow = false;
item.total_num = 0
item.goods.forEach(goods => {
item.total_num += goods.total_num
})
})
return newList
let {
status,
message,
data
} = await OrderApi.list({
dataType: this.getTabValue(),
page: this.pageNum,
keyword: this.keyword
});
if (status == 200) {
uni.hideLoading();
this.list = this.list.concat(data.list.data)
this.total = data.list.total
}
},
//
@ -340,6 +296,7 @@
//
onChangeTab(index) {
const app = this
app.list=[]
//
app.curTab = index
if (index == 6) {
@ -352,14 +309,6 @@
}
},
//
onRefreshList() {
this.list = getEmptyPaginateObj()
setTimeout(() => {
this.mescroll.resetUpScroll()
}, 120)
},
//
onCancel(orderId) {
const app = this
@ -492,6 +441,12 @@
})
},
//
handleTargetGoods(goodsId) {
this.$navTo('pages/goods/detail', {
goodsId
})
},
//
handleTargetComment(orderId) {
this.$navTo('pages/order/comment/index', {

@ -75,7 +75,7 @@
</view>
<view class="memVip fxVip" @click="goMember('fx')">
<image :src="$picUrl+'/static/bg-4.png'" class="icon"></image>
<image :src="$picUrl+'/static/bg-3.png'" class="icon"></image>
<!-- <view class="vipLine">
<image :src="$picUrl+'/static/user/vip.png'" class="vipIcon"></image>
<text>分销会员</text>

Loading…
Cancel
Save