diff --git a/api/model/order.js b/api/model/order.js
index 79f7ba7..a621609 100644
--- a/api/model/order.js
+++ b/api/model/order.js
@@ -162,7 +162,19 @@ const api = {
limit: 500
},
-
+ // 批量修改团长订单
+ updateOrders: {
+ url: '/teambuy/order/updateOrders',
+ method: 'POST',
+ limit: 500
+ },
+
+ // 获取管理员订单
+ managerOrderList: {
+ url: '/teambuy/order/managerOrderList',
+ method: 'GET',
+ limit: 200
+ }
}
export default api
\ No newline at end of file
diff --git a/mixins/order.js b/mixins/order.js
index 6a1a457..516c883 100644
--- a/mixins/order.js
+++ b/mixins/order.js
@@ -55,65 +55,6 @@ export default {
})
},
-
- // 立即支付
- // toPayOrder(item){
- // let api = ''
-
- // // if([0, 1].includes(item.shopState)){
- // // api = 'createOrderTwo'
- // // }else{
- // api = 'createSumOrderAgain'
- // // }
-
- // this.$api(api, {
- // orderId : item.id,
- // addressId : item.addressId
- // }, res => {
- // if(res.code == 200){
- // uni.requestPaymentWxPay(res)
- // .then(res => {
- // uni.showToast({
- // title: '支付成功',
- // icon: 'none'
- // })
- // this.getData()
- // }).catch(n => {
- // this.getData()
- // })
- // }
- // })
- // },
- // 确认收货
- // confirmOrder(item){
- // uni.showModal({
- // title: '您收到货了吗?',
- // success : e => {
- // if(e.confirm){
- // this.$api('confirmOrder', {
- // orderId : item.id,
- // }, res => {
- // this.getData()
- // })
- // }
- // }
- // })
- // },
- // // 取消订单
- // cancelOrder(item){
- // uni.showModal({
- // title: '确认取消订单吗?',
- // success : e => {
- // if(e.confirm){
- // this.$api('cancelOrder', {
- // orderId : item.id,
- // }, res => {
- // this.getData()
- // })
- // }
- // }
- // })
- // },
},
beforeDestroy() {
this.clearCouponData();
diff --git a/pages.json b/pages.json
index 78368c4..e5351e6 100644
--- a/pages.json
+++ b/pages.json
@@ -21,6 +21,13 @@
"enablePullDownRefresh": true
}
},
+ {
+ "path": "pages/index/orderManage",
+ "style": {
+ "navigationBarTitleText": "订单管理",
+ "enablePullDownRefresh": true
+ }
+ },
{
"path": "pages/index/center",
"style": {
diff --git a/pages/index/cart.vue b/pages/index/cart.vue
index 3ad8b19..60e39f2 100644
--- a/pages/index/cart.vue
+++ b/pages/index/cart.vue
@@ -112,7 +112,7 @@ export default {
}, 0)
},
deleteCartIds(){
- return this.checkboxValue.join(',')
+ return this.checkboxValue.join(';')
}
},
methods: {
diff --git a/pages/index/center.vue b/pages/index/center.vue
index 08d06c7..5c65a53 100644
--- a/pages/index/center.vue
+++ b/pages/index/center.vue
@@ -89,7 +89,7 @@
@@ -159,6 +159,13 @@
团长信息
+
+
+
+
+ 订单管理
+
+
@@ -192,6 +199,17 @@ export default {
}
},
methods: {
+ gotoManage(){
+ // 先判断是否是管理员身份
+ if(this.userInfo && this.userInfo.isManager === '1'){
+ this.navigateTo('/pages/index/orderManage?tabIndex=0')
+ }else{
+ uni.showToast({
+ title: '您不是管理员身份',
+ icon: 'error'
+ })
+ }
+ },
navigateTo(url) {
this.$utils.navigateTo({
url
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2bfc39b..92b6acb 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -81,8 +81,8 @@
{{
order.updateTime ?
- $timeUtils.formatTime($dayjs(order.updateTime).unix()) :
- $timeUtils.formatTime($dayjs(order.createTime).unix())
+ $timeUtils.formatTime($dayjs(order.updateTime).valueOf()) :
+ $timeUtils.formatTime($dayjs(order.createTime).valueOf())
}}
diff --git a/pages/index/orderManage.vue b/pages/index/orderManage.vue
new file mode 100644
index 0000000..8a20c21
--- /dev/null
+++ b/pages/index/orderManage.vue
@@ -0,0 +1,379 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ meal.title }}
+ 本单佣金合计: ¥{{ (meal.commission || 0).toFixed(2) || 0.00 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages_order/components/order/placeOrder.vue b/pages_order/components/order/placeOrder.vue
index 17f72e8..0a126c4 100644
--- a/pages_order/components/order/placeOrder.vue
+++ b/pages_order/components/order/placeOrder.vue
@@ -58,9 +58,11 @@
账户余额
- (余额: ¥{{ (userInfo.balance || 0).toFixed(2) }})
+ (余额: ¥{{ (userInfo.balance ||
+ 0).toFixed(2) }})
-
+
@@ -162,7 +164,25 @@ export default {
},
// 添加open方法,用于外部调用打开弹窗
open() {
- this.$refs.popup.open();
+ // 判断绑定团长没有
+ this.$api('queryMyLeader', {}, res => {
+ this.$refs.popup.open();
+ if (res.code == 200 && res.result.bindStatus != '2') {
+ this.pickupPoint = res.result
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还没有绑定团长,请先绑定团长',
+ confirmColor: '#019245',
+ success: (res) => {
+ if (res.confirm) {
+ this.$utils.navigateTo('/pages_order/mine/unbindTeam')
+ }
+ this.$refs.popup.close()
+ },
+ })
+ }
+ })
},
// 添加close方法,用于关闭弹窗
close(){
@@ -173,20 +193,10 @@ export default {
console.log('弹窗状态变化:', e);
// 可以在这里添加弹窗打开或关闭后的逻辑处理
},
+
// 跳转到取餐点选择页面
gotoPickupPoint() {
- this.$utils.navigateTo('/pages_order/location/pickupPoint')
- },
-
- // 获取并监听取餐点选择事件
- listenPickupPoint() {
- const pickupPointStr = uni.getStorageSync('selectedPickupPoint');
- if (pickupPointStr) {
- this.pickupPoint = JSON.parse(pickupPointStr);
- }
- uni.$on('updatePickupPoint', (point) => {
- this.pickupPoint = point;
- })
+ this.$utils.navigateTo('/pages_order/mine/unbindTeam')
},
// 创建订单
@@ -194,7 +204,7 @@ export default {
if (!this.pickupPoint) {
uni.showModal({
title: '提示',
- content: '请选择取餐地点',
+ content: '请绑定团长',
showCancel: false,
confirmColor: '#019245',
success: () => {
@@ -218,13 +228,6 @@ export default {
this.handlePay(this.orderParams)
}
},
- mounted(){
- this.listenPickupPoint();
- },
- beforeDestroy() {
- uni.$off('updatePickupPoint');
- // this.clearCouponData();
- }
}
@@ -254,6 +257,7 @@ export default {
color: $uni-color-third;
}
}
+
.place-order-address{
display: flex;
height: 80rpx;
diff --git a/pages_order/order/afterSale.vue b/pages_order/order/afterSale.vue
index 83b0cde..f89f343 100644
--- a/pages_order/order/afterSale.vue
+++ b/pages_order/order/afterSale.vue
@@ -66,6 +66,11 @@
components: {
navbar
},
+ computed: {
+ images(){
+ return this.uploadedImages.join(',')
+ }
+ },
data() {
return {
orderId: '',
@@ -148,7 +153,13 @@
})
return
}
-
+ if (!this.$utils.verificationPhone(this.contactInfo)) {
+ uni.showToast({
+ title: '请输入正确号码',
+ icon: 'error'
+ })
+ return
+ }
// 显示提交中提示
uni.showLoading({
title: '正在提交...'
@@ -158,7 +169,7 @@
...this.idObject,
phone: this.contactInfo,
content: this.problemDescription,
- images: this.uploadedImages
+ image: this.images
}, res => {
uni.hideLoading()
if (res.code == 200) {
diff --git a/pages_order/product/productDetail.vue b/pages_order/product/productDetail.vue
index f4ebe79..93d0826 100644
--- a/pages_order/product/productDetail.vue
+++ b/pages_order/product/productDetail.vue
@@ -3,13 +3,6 @@
-
-
- ¥{{ productDetail.price }}
- /元每件
-
-
- ¥{{ productDetail.oldPrice }}
- /元
-
- -->
-
-
-
-
-
-
-
-
@@ -189,10 +128,7 @@
return
}
this.$refs.placeOrder.open()
- // this.$store.commit('setPayOrderProduct', [
- // this.productDetail
- // ])
- // this.$utils.navigateTo('/pages_order/order/createOrder')
+
},
toSend(){
this.$store.commit('setPayOrderProduct', [