From 0dd601b17606eb4717167735c3054fa6ac354638 Mon Sep 17 00:00:00 2001
From: shenyuan
Date: Wed, 8 Feb 2023 17:53:04 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../views/shopping/pages/gerenzhongxin.vue | 62 +++++++++++++++----
.../src/views/shopping/pages/orderDetails.vue | 24 +++++--
2 files changed, 69 insertions(+), 17 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
index cdfad00a..f493b342 100644
--- a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
+++ b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
@@ -74,7 +74,8 @@
总计:¥ {{item.total}}
立即支付
- 查看详情
+ 确认收货
+ 查看详情
@@ -93,17 +94,18 @@
components: { Header,Footer },
data() {
return {
- current: ['mail'],
+ current: ['allorders'],//目前打开的菜单
allOrders1:[
{
id:1,
orderNum:'CN172839729',
- pay:false,
+ pay:false,//是否支付
+ receipt:false,//是否收货
url:require("../assets/cloth001.png"),
name:'商品名商品名商品名商品名商品',
type:'衬衫',
size:'XXL',
- num:2,
+ num:1,
price:2456,
material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6',
total:5912
@@ -112,6 +114,21 @@
id:2,
orderNum:'CN172839730',
pay:true,
+ receipt:true,//是否收货
+ url:require("../assets/cloth002.png"),
+ name:'商品名商品名商品名商品名商品',
+ type:'衬衫',
+ size:'XXL',
+ num:2,
+ price:2456,
+ material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6',
+ total:5912
+ },
+ {
+ id:3,
+ orderNum:'CN172839731',
+ pay:true,
+ receipt:false,//是否收货
url:require("../assets/cloth002.png"),
name:'商品名商品名商品名商品名商品',
type:'衬衫',
@@ -121,24 +138,47 @@
material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6',
total:5912
}
- ],
- allOrders:[],
-
+ ],//所有订单,包括未支付、未收获等
+ allOrders:[],//目前展示的订单
};
},
+ mounted() {
+ if(this.current[0] == 'allorders'){
+ this.allOrders = this.allOrders1
+ }
+ },
methods: {
callback(key) {
console.log(key);
},
+ openDetail(item) {
+ console.log('item')
+ console.log(item)
+ this.$router.push({
+ path: "/shopping/order",
+ query: {
+ id: item.id,
+ pay: item.pay,
+ receipt: item.receipt,
+ },
+ });
+ },
menuChange(key){
this.current.shift()
this.current.push(key.key)
- console.log(this.allOrders)
-
if(key.key == 'allorders'){
- console.log('----')
this.allOrders = this.allOrders1
- console.log(this.allOrders)
+ }
+ else if(key.key == 'daizhifu'){
+ this.allOrders = this.allOrders1.filter(item=>item.pay == false)
+ }
+ else if(key.key == 'daishouhuo'){
+ this.allOrders = this.allOrders1.filter(item=>item.receipt == false && item.pay == true)
+ }
+ else if(key.key == 'yiwancheng'){
+ this.allOrders = this.allOrders1.filter(item=>item.receipt == true)
+ }else{
+ this.allOrders=[]
}
}
},
diff --git a/ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue b/ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue
index 0c42dc13..e1e369f1 100644
--- a/ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue
+++ b/ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue
@@ -6,16 +6,16 @@
- 上级页面
- 上级页面
- 上级页面
-
+ 个人中心
+ 上级页面
@@ -130,8 +130,20 @@
components: { Header,Footer },
data() {
return {
+ model:{
+ id:'',
+ pay:false,
+ receipt:false
+ }
};
},
+ created() {
+ this.model.id = this.$route.query.id
+ this.model.pay = JSON.parse(this.$route.query.pay)
+ this.model.receipt = JSON.parse(this.$route.query.receipt)
+ console.log('this.model')
+ console.log(this.model)
+ },
methods: {
},