classify 8.4

This commit is contained in:
2020-08-04 19:08:04 +08:00
parent 1e9f442b7b
commit 2fd62acb73
26 changed files with 563 additions and 186 deletions

View File

@@ -1,11 +1,11 @@
<template>
<view class="details" v-if="orderInfo.extend_store">
<view class="status" v-if="state">
<view class="status" v-if="orderstate">
<view class="text">
<view class="status-text">{{ s_object[state].text }}</view>
<view class="status-text">{{ s_object[orderstate].text }}</view>
<view class="time" v-if="orderInfo.view_type == 1">距离结束{{ countdown }}</view>
</view>
<image :src="s_object[state].image"></image>
<image :src="s_object[orderstate].image"></image>
</view>
<view class="info">
<view class="info-address">
@@ -67,15 +67,16 @@
<view>创建时间{{ orderInfo.add_time | date}}</view>
</view>
</view>
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(state) >= 0">
<view class="cancel" v-if="state == '4' || state == '1'" @click="applyRefund">申请退款</view>
<view class="cancel" v-if="state == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="state == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="state == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="state == '6'" @click="cancelOrder">取消支付</view>
<view class="payment" v-if="state == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="state == '7'">联系官方客服</view>
<view class="submit" v-if="state == '7'">提交官方审核</view>
<view class="btn" v-if="['1', '2', '4', '6'].indexOf(orderstate) >= 0">
<!-- @click="toOtherPage('RefundOrder')" -->
<view class="cancel" v-if="orderstate == '4' || orderstate == '1'">申请退款</view>
<view class="cancel" v-if="orderstate == '1'" @click="toOtherPage('Logistics')">查看物流</view>
<view class="logistics" v-if="orderstate == '1'" @click="confirmReceive">确认收货</view>
<view class="comment" v-if="orderstate == '2'" @click="toOtherPage('Comment')">立即评价</view>
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
<view class="payment" v-if="orderstate == '6'" @click="payNow">立即支付</view>
<view class="service" v-if="orderstate == '7'">联系官方客服</view>
<view class="submit" v-if="orderstate == '7'">提交官方审核</view>
</view>
</view>
</template>
@@ -83,7 +84,7 @@
export default {
data() {
return {
state: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付 7: 待退款 8: 已退款
orderstate: '', // 1: 待收货 2: 待评价 3: 交易成功 4: 已取消 5: 已退款 6: 待支付 7: 待退款 8: 已退款
s_object: {
'1': {
text: '待收货',
@@ -113,6 +114,10 @@ export default {
text: '待退款',
image: '../static/mine/34.png',
},
'8': {
text: '拼团中',
image: '../static/mine/37.png',
},
},
orderInfo: {},
oid: '',
@@ -155,10 +160,13 @@ export default {
case 7:
state = '5';
break;
case 9:
state = '8';
break;
default:
break;
}
this.state = state;
this.orderstate = state;
},
setSpikeTime(time) {
// console.log(time);

View File

@@ -1,7 +1,7 @@
<template>
<view class="order">
<view>
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
<u-tabs-swiper ref="tabs" :list="list" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper>
</view>
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
<swiper-item class="swiper-item" v-for="(item, index) in list" :key="index">
@@ -35,13 +35,15 @@ export default {
name: '待收货'
}, {
name: '试穿试送'
},{
name: '拼团中'
}, {
name: '售后'
}, {
name: '待评价'
}],
orderList: [],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
loadStatus: ['loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore','loadmore'],
page: 0,
current: Number,
swiperCurrent: 0,
@@ -94,9 +96,12 @@ export default {
type = -1; // 试穿试送
break;
case 5:
type = 8; // 售后
type = 9; // 拼团中
break;
case 6:
type = 8; // 售后
break;
case 7:
type = 4; // 待评价
break;
default:

142
pageE/order/RefundOrder.vue Normal file
View File

@@ -0,0 +1,142 @@
<template>
<view class="refund">
<view class="radios-container">
<u-radio-group v-model="value" @change="radioChange">
<label class="radio-view" v-for="(item, index) in goodsList" :key="index">
<view class="radio">
<u-radio color="#F0AD4E" :name="item.goods_id" active-color="#FF780F" icon-size="34" shape="circle"></u-radio>
</view>
<view class="store_info">
<view class="info_img">
<image :src="item.goods_image" mode="">
</view>
<view class="info_txt">
<view class="content u-line-2">
{{ item.goods_name }}
</view>
<view class="much">
<text>{{ item.goods_pay_price }}</text>
<text>x{{ item.goods_num }}</text>
</view>
</view>
</view>
</label>
</u-radio-group>
</view>
<view class="refund-details">
<view class="goods-number">
<view>选择数量</view>
<view></view>
</view>
<view class="refund-price">
<view>
<view>退款金额</view>
<view>99.00</view>
</view>
<view>若退款成功将退还给您99.00</view>
</view>
<view class="refund-text">
<view>申请说明</view>
<u-input v-model="refundText" type="textarea" />
</view>
</view>
<view class="submit-btn">提交申请</view>
</view>
</template>
<script>
export default {
data() {
return {
goodsList: [],
value: '',
}
},
onLoad(option) {
this.getOrderInfo(option.oid);
},
methods: {
radioChange(e){
console.log(e)
},
getOrderInfo(id) {
this.$u.api.getOrderInfo({
order_id: id,
}).then(res => {
if(res.errCode == 0) {
// this.orderInfo = res.data;
this.goodsList = res.data.extend_order_goods;
console.log(this.goodsList);
}
// uni.stopPullDownRefresh(); // 结束刷新
})
},
applyRefund() {
let params = {
order_id: this.order.order_id,
// goods_id: goods_id,
// refund_amount: refund_amount,
}
this.$u.api.refundOrder(params).then(res => {
this.$u.toast(res.message);
if(res.errCode == 0) {
}
})
},
}
};
</script>
<style lang="scss" scoped>
.refund {
min-height: calc(100vh - var(--window-top));
background-color: #EDEDED;
.radios-container {
margin-bottom: 20rpx;
.radio-view {
background-color: #FFFFFF;
padding: 26rpx;
display: flex;
align-items: center;
margin-bottom: 1rpx;
.radio {
margin-right: 20rpx;
}
.store_info {
display: flex;
flex-wrap: nowrap;
width: 100%;
.info_img{
>image{
width: 180rpx;
height: 160rpx;
background-color: aqua;
border-radius: 10rpx;
}
}
.info_txt{
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
flex-wrap: wrap;
width: 100%;
.content{
height: 74rpx;
line-height: 37rpx;
font-size: 30rpx;
color:rgba(51,51,51,1);
}
.much{
display: flex;
justify-content: space-between;
width: 100%;
}
}
}
}
}
.refund-details {
background-color: #FFFFFF;
.goods-number {}
}
}
</style>