Browse Source

售后列表

master
2021 4 years ago
parent
commit
fa598c2462
  1. 12
      pages/order/GoodsReturn/index.vue
  2. 88
      pages/order/ReturnList/index.vue
  3. 121
      pages/order/ReturnList/listItem.vue
  4. 4
      utils/request.js

12
pages/order/GoodsReturn/index.vue

@ -154,6 +154,7 @@ export default {
serviceType: null,
//
selectProduct: [],
productParamList: [],
totalNum: 0,
totalMoney: 0,
isAllSelect: false
@ -237,7 +238,11 @@ export default {
chooseType (val) {
this.selectProduct = this.selectProduct.map(item => {
if (item.checked) {
this.totalMoney += parseFloat(item.costPrice)
this.productParamList.push({
productId: item.productId
})
console.log(item.costPrice)
this.totalMoney += parseFloat(item.truePrice)
this.totalNum += 1
return item
}
@ -255,16 +260,13 @@ export default {
});
return
}
// this.listquery.productParamList.push({
// productId: item.productId
// })
submitAfterSealsOrder({
orderCode: this.orderInfo.orderId,
serviceType: this.serviceType,
reasonForApplication: this.reason,
applicationInstructions: refund_reason_wap_explain,
applicationDescriptionPicture: this.refund_reason_wap_img.join(","),
productParamList: []
productParamList: this.productParamList
}).then(res => {
if (res.status === 200) {
uni.showToast({

88
pages/order/ReturnList/index.vue

@ -13,44 +13,12 @@
</view>
</view>
<!-- 商品列表 -->
<!-- <view class="list">
<ListItem />
</view> -->
<view class="goodWrapper"
v-for="(order,orderListIndex) in orderList"
:key="orderListIndex"
>
<view class="iconfont icon-tuikuanzhong powder" v-if="order._status._type === -1"></view>
<view class="iconfont icon-yituikuan" v-if="order._status._type === -2"></view>
<view class="orderNum">订单号{{ order.orderId || '' }}</view>
<view
class="item acea-row row-between-wrapper"
v-for="(cart,cartInfoIndex) in order.cartInfo"
:key="cartInfoIndex"
@click="goOrderDetails(order)"
>
<view class="pictrue">
<image :src="cart.productInfo.image" class="image" @click.stop="goGoodsCon(cart)" />
</view>
<view class="text">
<view class="acea-row row-between-wrapper">
<view class="name line1">{{ cart.productInfo.storeName }}</view>
<view class="num">x {{ cart.cartNum }}</view>
</view>
<view
class="attr line1"
v-if="cart.productInfo.attrInfo"
>{{ cart.productInfo.attrInfo.sku }}</view>
<view class="attr line1" v-else>{{ cart.productInfo.storeName }}</view>
<view class="money">{{ cart.productInfo.price }}</view>
</view>
</view>
<view class="totalSum">
{{ order.cartInfo.length || 0 }}件商品总金额
<text
class="font-color-red price"
>{{ order.payPrice || 0 }}</text>
</view>
<view class="list">
<ListItem
v-for="(item,index) in orderList"
:key="index"
:item="item"
/>
</view>
<view class="noCart" v-if="orderList.length === 0 && page > 1">
<view class="pictrue">
@ -78,9 +46,10 @@ export default {
orderList: [],
listQuery: {
page: 1,
limit: 20,
limit: 5,
type: 0
},
type: 0,
loading: false,
loaded: false
};
@ -92,44 +61,29 @@ export default {
!this.loading && this.getOrderList();
},
methods: {
goGoodsCon(cart) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
query: { id: cart.productInfo.id }
});
},
goOrderDetails(order) {
this.$yrouter.push({
// path: "/pages/order/OrderReturnDetail/index",
path: "/pages/order/OrderDetails/index",
query: { id: order.orderId }
});
},
//
getOrderList() {
const { page, limit } = this;
if (this.loading || this.loaded) return;
if ((this.loading || this.loaded) && (this.type === this.listQuery.type)) return;
this.loading = true;
// getOrderList({
// page,
// limit,
// type: -3
// }).then(res => {
// this.orderList = this.orderList.concat(res.data);
// this.loading = false;
// this.loaded = res.data.length < limit;
// this.page++;
// });
//
getAfterSealsList(this.listQuery).then(res => {
// console.log(res)
this.orderList = this.orderList.concat(res.data);
if (this.type === this.listQuery.type) {
this.orderList = [...this.orderList, ...res.data];
} else {
this.orderList = res.data;
this.type = this.listQuery.type
}
this.listQuery.page++;
//
this.loading = false;
this.loaded = res.data.length < limit;
this.page++;
this.loaded = res.data.length < this.listQuery.limit;//
})
},
//
changeType (type) {
this.listQuery.type = type
this.listQuery.page = 1;
this.getOrderList()
}
}

121
pages/order/ReturnList/listItem.vue

@ -3,41 +3,79 @@
<view class="productItem">
<view class="title">
<view class="shopName">
{{ 'YSHOP商铺' }}
订单号{{ item.orderCode }}
</view>
<view class="status">
<view>审核中</view>
</view>
</view>
<view class="content">
<image src="" mode=""></image>
<view class="content" v-for="(i, index) in item.cartInfo">
<image class="img"
:src="i.productInfo.image"
mode=""
@click.stop="goGoodsCon(i)"
></image>
<view class="info">
<view class="infoTitle">
工装裤男秋冬季韩版潮流潮牌ins直筒宽松阔腿休闲百搭加绒长裤子
{{ i.productInfo.storeName }}
</view>
<view class="infoSku">
<view class="sku">
黑色 XL
{{ i.productInfo.attrInfo.sku || '' }}
</view>
<view class="num">
x {{ 1 }}
</view>
</view>
<view class="infoMoney">
退款299.00
退款<view class="red">
{{ i.productInfo.price }}
</view>
</view>
</view>
</view>
<view class="money">
<view class="status">
<view>审核中</view>
</view>
<view class="refundMoney">
退款<view class="red">
{{ item.refundAmount }}
</view>
</view>
</view>
<view class="btns">
<view class="button def"
@click="toDetail"
v-if="item.state === 2"
>删除记录</view>
<view class="button redBtn" @click="toDetail(item)">查看详情</view>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
type: Object,
default: () => ({})
}
},
methods:{
//
goGoodsCon(item) {
this.$yrouter.push({
path: "/pages/shop/GoodsCon/index",
query: { id: item.productInfo.id }
});
},
//
toDetail (item) {
this.$yrouter.push({
path: "/pages/order/OrderReturnDetail/index",
query: { id: item.orderId }
});
}
}
}
</script>
<style lang="scss" scoped>
@ -48,26 +86,81 @@
height: 80rpx;
padding: 0 30rpx;
color: #333;
font-size: 14px;
font-size: 28rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.content{
padding: 20rpx 30rpx;
border: 2rpx solid #F3F4F5;
display: flex;
.img{
width: 180rpx;
height: 180rpx;
}
.info{
flex: 1;
margin-left: 16rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
.infoTitle{
width: 100%;
height: 80rpx;
font-size: 28rpx;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
}
.infoSku{
font-size: 24rpx;
color: #999999;
display: flex;
justify-content: space-between;
}
.infoMoney{
font-size: 24rpx;
}
}
}
.money{
height: 80rpx;
padding: 0 30rpx;
font-size: 28rpx;
font-family: PingFang SC;
color: #333333;
border: 2rpx solid #F3F4F5;
display: flex;
justify-content: space-between;
align-items: center;
}
.btns{
height: 50rpx;
padding: 0 30rpx;
padding: 20rpx 30rpx;
display: flex;
justify-content: flex-end;
.button{
width: 160rpx;
height: 58rpx;
margin: 0 10rpx;
border-radius: 180rpx;
font-size: 24rpx;
line-height: 54rpx;
text-align: center;
}
.def{
color: #DDD;
border: 2rpx solid #DDDDDD;
}
.redBtn{
color: #FFF;
background-color: #EB3729;
border: 2rpx solid #EB3729;
}
}
.red{
display: inline-block;
color: #EB3729;
}
}
</style>

4
utils/request.js

@ -22,12 +22,12 @@ fly.config.baseURL = VUE_APP_API_URL
// 小程序测试请求域名
// #ifdef MP-WEIXIN
fly.config.baseURL = 'http://347i13244b.zicp.vip/api'
fly.config.baseURL = 'http://29e25012l6.qicp.vip/api'
// #endif
// #ifdef APP-PLUS
// app端
fly.config.baseURL = 'http://347i13244b.zicp.vip/api'
fly.config.baseURL = 'http://29e25012l6.qicp.vip/api'
// #endif
fly.interceptors.response.use(

Loading…
Cancel
Save