zhc4dev
暖暖 2 years ago
parent 10a60ae206
commit 0dd601b176
  1. 62
      ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
  2. 24
      ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue

@ -74,7 +74,8 @@
<span class="f_20 c_1B">总计¥ {{item.total}}</span> <span class="f_20 c_1B">总计¥ {{item.total}}</span>
<span class="f_16 c_333 "> <span class="f_16 c_333 ">
<a class="btn ljzf" v-if="!item.pay">立即支付</a> <a class="btn ljzf" v-if="!item.pay">立即支付</a>
<router-link to="/shopping/order" class="btn ckxq">查看详情</router-link> <a class="btn ljzf" v-if="!item.receipt && item.pay">确认收货</a>
<a class="btn ckxq" @click="openDetail(item)">查看详情</a>
</span> </span>
</p> </p>
</div> </div>
@ -93,17 +94,18 @@
components: { Header,Footer }, components: { Header,Footer },
data() { data() {
return { return {
current: ['mail'], current: ['allorders'],//
allOrders1:[ allOrders1:[
{ {
id:1, id:1,
orderNum:'CN172839729', orderNum:'CN172839729',
pay:false, pay:false,//
receipt:false,//
url:require("../assets/cloth001.png"), url:require("../assets/cloth001.png"),
name:'商品名商品名商品名商品名商品', name:'商品名商品名商品名商品名商品',
type:'衬衫', type:'衬衫',
size:'XXL', size:'XXL',
num:2, num:1,
price:2456, price:2456,
material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6', material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6',
total:5912 total:5912
@ -112,6 +114,21 @@
id:2, id:2,
orderNum:'CN172839730', orderNum:'CN172839730',
pay:true, 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"), url:require("../assets/cloth002.png"),
name:'商品名商品名商品名商品名商品', name:'商品名商品名商品名商品名商品',
type:'衬衫', type:'衬衫',
@ -121,24 +138,47 @@
material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6', material:'主料1,辅料2,辅料3,辅料4,辅料5,辅料6',
total:5912 total:5912
} }
], ],//
allOrders:[], allOrders:[],//
}; };
}, },
mounted() {
if(this.current[0] == 'allorders'){
this.allOrders = this.allOrders1
}
},
methods: { methods: {
callback(key) { callback(key) {
console.log(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){ menuChange(key){
this.current.shift() this.current.shift()
this.current.push(key.key) this.current.push(key.key)
console.log(this.allOrders)
if(key.key == 'allorders'){ if(key.key == 'allorders'){
console.log('----')
this.allOrders = this.allOrders1 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=[]
} }
} }
}, },

@ -6,16 +6,16 @@
<div class="orderMain"> <div class="orderMain">
<div class="jz"> <div class="jz">
<el-breadcrumb class="breadcrumb" separator="/"> <el-breadcrumb class="breadcrumb" separator="/">
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/shopping/person' }">个人中心</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/shopping/person' }">上级页面</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<!-- <el-breadcrumb-item>{{this.$route.query.title }}</el-breadcrumb-item>-->
</el-breadcrumb> </el-breadcrumb>
<div class="d-flex"> <div class="d-flex">
<div class="l"> <div class="l">
<div class="card"> <div class="card">
<p class="f_24">已发货</p> <p class="f_24" v-if="!this.model.pay">待支付</p>
<a class="c_333 f_12">查看发票详情</a> <p class="f_24" v-if="!this.model.receipt && this.model.pay">待收货</p>
<p class="f_24" v-if="this.model.receipt">已完成</p>
<a class="c_333 f_12" v-if="this.model.receipt">查看发票详情</a>
</div> </div>
<div class="steps"> <div class="steps">
<a-steps direction="vertical" size="small" :current="1"> <a-steps direction="vertical" size="small" :current="1">
@ -130,8 +130,20 @@
components: { Header,Footer }, components: { Header,Footer },
data() { data() {
return { 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: { methods: {
}, },

Loading…
Cancel
Save