diff --git a/api/model/order.js b/api/model/order.js
index 9f896ab..c07fd82 100644
--- a/api/model/order.js
+++ b/api/model/order.js
@@ -23,7 +23,7 @@ const api = {
method: 'GET',
},
// 订单开具发票
- evaluate: {
+ invoice: {
url: '/order_common/invoice',
method: 'POST',
},
diff --git a/components/cart/CardList.vue b/components/cart/CardList.vue
index 69549af..4769395 100644
--- a/components/cart/CardList.vue
+++ b/components/cart/CardList.vue
@@ -21,10 +21,13 @@
+
+
+
@@ -57,8 +60,8 @@
},
mounted() {},
methods: {
- skip(val) {
- this.$emit('btnClick', val)
+ skip(val, type) {
+ this.$emit('btnClick', val, type)
},
toOrderDetails(val) {
this.$emit('toOrderDetails', val)
diff --git a/pages/index/cart.vue b/pages/index/cart.vue
index 2579283..e7a51a9 100644
--- a/pages/index/cart.vue
+++ b/pages/index/cart.vue
@@ -13,6 +13,7 @@
+
@@ -33,6 +34,7 @@
Navbar
},
data() {
+ this.orderId = '';
return {
status:"loading",
params: {
@@ -45,9 +47,9 @@
name: '全部'
},
{
- id: 0,
- name: '未付款'
- },
+ id: 0,
+ name: '未付款'
+ },
{
id: 1,
name: '待参加'
@@ -62,64 +64,6 @@
},
],
lineBg: require('@/static/image/cart/tabIcon.png'),
- // cardListData: [{
- // imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
- // orderTime: '2024.08.23 12:00',
- // state: 'U',
- // stateText: '待参加',
- // title: '夏日去撒野旅游计划~',
- // time: '2024.10.28 10:00',
- // address: '成都市东丽湖露营地32号',
- // totalPrice: '298.00',
- // btnObj: [{
- // id: '0',
- // btnTitle: '取消活动',
- // color: '#AFAFAF',
- // bgColor: '#34312E'
- // },
- // {
- // id: '1',
- // btnTitle: '活动签到',
- // color: '#FF4546',
- // bgColor: '#492623'
- // }
- // ]
- // },
- // {
- // imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
- // orderTime: '2024.08.23 12:00',
- // state: 'S',
- // stateText: '已完成',
- // title: '夏日去撒野旅游计划~',
- // time: '2024.10.28 10:00',
- // address: '成都市东丽湖露营地32号',
- // totalPrice: '298.00',
- // btnObj: [{
- // id: '2',
- // btnTitle: '活动评价',
- // color: '#FF4546',
- // bgColor: '#492623'
- // },
- // {
- // id: '3',
- // btnTitle: '开具发票',
- // color: '#FFB245',
- // bgColor: '#49361D'
- // }
- // ]
- // },
- // {
- // imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
- // orderTime: '2024.08.23 12:00',
- // state: 'F',
- // stateText: '已完成',
- // title: '夏日去撒野旅游计划~',
- // time: '2024.10.28 10:00',
- // address: '成都市东丽湖露营地32号',
- // totalPrice: '298.00',
- // btnObj: []
- // }
- // ]
totalPage: 0,
cardListData: []
}
@@ -164,17 +108,41 @@
})
},
btnClick(item,type) {//0取消活动 1活动签到 2评价活动 3开具发票
+ this.orderId = item.id;
+ if (type == 0) {
+ this.$refs.modal.open();
+ }
+ if (type == 1) {
+ this.$api('signIn', {orderId: item.id}, res=> {
+ if (res.code == 200) {
+ this.cardListData = []
+ this.getOrderPageList()
+ this.$refs.toast.show({
+ type: 'success',
+ message: res.result
+ })
+ }
+ })
+ }
if (type == 2) {
uni.navigateTo({
- url: '/pages_order/orderEvaluation'
+ url: `/pages_order/orderEvaluation?activityId=${this.orderId}`
})
}
if (type == 3) {
uni.navigateTo({
- url: '/pages_order/invoiceIssuance'
+ url: `/pages_order/invoiceIssuance?orderId=${this.orderId}`
})
}
- }
+ },
+ confirm() {
+ this.$api('cancelOrder', {orderId: this.orderId}, res => {
+ if (res.code == 200) {
+ this.cardListData = [];
+ this.getOrderPageList();
+ }
+ })
+ }
}
}
diff --git a/pages_order/invoiceIssuance.vue b/pages_order/invoiceIssuance.vue
index a00b77b..460d1dc 100644
--- a/pages_order/invoiceIssuance.vue
+++ b/pages_order/invoiceIssuance.vue
@@ -1,7 +1,7 @@
-
+
@@ -9,11 +9,11 @@
- 夏日去撒野旅游计划~
- 2024.10.28 10:00
- 成都市东丽湖露营地32号
+ {{activityItem.title}}
+ {{activityItem.startTime}}
+ {{activityItem.address}}
- 总计¥800.00
+ 总计¥{{activityItem.price}}
@@ -27,27 +27,26 @@
labelColor="#fff"
activeColor="#FF4546"
iconPlacement="right">
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
@@ -61,25 +60,42 @@
},
data() {
return {
- radioValue: '香蕉',
- enterpriseName: '',
- aa: {
- color: '#f40'
+ orderId: '',
+ radioValue: '0',
+ invoicingInfo: {
+ name: '',
+ no: '',
+ emil: ''
}
}
},
+ onLoad({orderId}) {
+ this.orderId = orderId
+ },
methods: {
toInvoiceRecords() {
- uni.navigateTo({
- url: '/pages_order/invoiceRecords'
+ let params = {}
+ params = this.invoicingInfo;
+ params.orderId = this.orderId
+ console.log(params);
+ this.$api('invoice', params, res=> {
+ if (res.code == 200) {
+ this.$refs.toast.show({
+ type: 'success',
+ message: res.result
+ })
+ uni.navigateTo({
+ url: '/pages_order/invoiceRecords'
+ })
+ }
})
+
}
}
}
\ No newline at end of file