From 679053f63d85f2f362595be5dc764ae12c54cd14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Thu, 13 Jun 2024 23:26:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=8C=85=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=9C=8D=E5=8A=A1=E5=8C=85=E5=8F=8A=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bl/massage/massagePackage.vue | 484 ++++++++++++++---------- src/views/bl/order/packageOrder.vue | 12 +- 2 files changed, 288 insertions(+), 208 deletions(-) diff --git a/src/views/bl/massage/massagePackage.vue b/src/views/bl/massage/massagePackage.vue index dcd5ecf..98f90ac 100644 --- a/src/views/bl/massage/massagePackage.vue +++ b/src/views/bl/massage/massagePackage.vue @@ -165,6 +165,32 @@ + + + + + + @@ -999,92 +1025,92 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ 用户: + +
+
+ 会员优惠比: + +
+
+ 购买数量: + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ 总金额: + +
+
+ 应付总金额: + +
+
+ 代金卷ID: + +
- - - - - - - - - - - - - - - - - - - - - - + +
+ + +
+ 订单ID: + +
+ +
@@ -1181,21 +1207,21 @@ export default { massageImgPercentage:0,//封面图片上传进度 //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - // packageId:"",//服务包ID - // ordersNo:"",//订单号 - // userId:"",//用户ID - // quantity:0,//数量 - // payMoney:0,//支付金额 - // payWay:"",//支付方式 - // couponId:"",//代金券ID - // dialogFormVisibleBuy: false, - // - // vipRate: 100, - // oldSumMoney: 0, - // sumMoney: 0, - // - // ordersId: "", - // dialogFormVisiblePay: false, + packageId:"",//服务包ID + ordersNo:"",//订单号 + userId:"",//用户ID + quantity:0,//数量 + payMoney:0,//支付金额 + payWay:"",//支付方式 + couponId:"",//代金券ID + dialogFormVisibleBuy: false, + + vipRate: 100, + oldSumMoney: 0, + sumMoney: 0, + + ordersId: "", + dialogFormVisiblePay: false, }; }, methods: { @@ -1366,6 +1392,50 @@ export default { }); }, + // 优惠卷可用与否 + changeCoupon(id, status) { + this.$http({ + url: this.$http.adornUrl(`massage/package/updateCoupon`), + method: "post", + params: this.$http.adornParams({ + // data: this.$http.adornData({ + id: id, + isCanCoupon: status, + }), + }).then(({data}) => { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.handleSelect(); + }, + }); + }); + }, + + // VIP可用与否 + changeVip(id, status) { + this.$http({ + url: this.$http.adornUrl(`massage/package/updateVip`), + method: "post", + params: this.$http.adornParams({ + // data: this.$http.adornData({ + id: id, + isCanVip: status, + }), + }).then(({data}) => { + this.$message({ + message: "操作成功", + type: "success", + duration: 1500, + onClose: () => { + this.handleSelect(); + }, + }); + }); + }, + // 启用与否 changeStatus(id, status) { this.$http({ @@ -2208,100 +2278,100 @@ export default { }, //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - // showBuyView(row){ - // this.packageId = row.id; - // this.userId = 400; - // this.quantity = 5; - // this.couponId = "2636,2635"; - // this.packagePrice = row.price;//单价 - // - // this.vipRate = 90; - // this.oldSumMoney = 835; - // this.sumMoney = 751.5; - // - // this.dialogFormVisibleBuy = true; - // }, - // - // handleBuy(){ - // if(this.quantity <= 0){ - // this.$message({ - // message: "购买失败,购买数量必须大于0!", - // type: "warning", - // duration: 1500 - // }); - // return; - // } - // this.$http({ - // url: this.$http.adornUrl("app/user/package/order/insertOrders"), - // method: "post", - // // params: this.$http.adornParams({ - // data: this.$http.adornData({ - // ordersPackageList: [{ - // packageId: this.packageId, - // num: this.quantity, - // }], - // vipRate: this.vipRate, - // oldSumMoney: this.oldSumMoney, - // sumMoney: this.sumMoney, - // couponId: this.couponId, - // userId: this.userId, - // }), - // }).then(({data}) => { - // if (data.code == 0) { - // this.$message({ - // message: "购买成功", - // type: "success", - // duration: 1500, - // onClose: () => { - // }, - // }); - // this.dialogFormVisibleBuy = false; - // } else { - // this.$message({ - // message: data.msg, - // type: "warning", - // duration: 1500, - // onClose: () => { - // }, - // }); - // } - // }); - // }, - // - // showPayView(){ - // this.ordersId = ""; - // this.dialogFormVisiblePay = true; - // }, - // - // handlePay(){ - // this.$http({ - // url: this.$http.adornUrl("app/user/package/order/payOrder"), - // method: "post", - // params: this.$http.adornParams({ - // // data: this.$http.adornData({ - // ordersId: this.ordersId, - // }), - // }).then(({data}) => { - // if (data.code == 0) { - // this.$message({ - // message: "支付成功", - // type: "success", - // duration: 1500, - // onClose: () => { - // }, - // }); - // this.dialogFormVisiblePay = false; - // } else { - // this.$message({ - // message: data.msg, - // type: "warning", - // duration: 1500, - // onClose: () => { - // }, - // }); - // } - // }); - // }, + showBuyView(row){ + this.packageId = row.id; + this.userId = 400; + this.quantity = 5; + this.couponId = "2636,2635"; + this.packagePrice = row.price;//单价 + + this.vipRate = 90; + this.oldSumMoney = 985; + this.sumMoney = 835; + + this.dialogFormVisibleBuy = true; + }, + + handleBuy(){ + if(this.quantity <= 0){ + this.$message({ + message: "购买失败,购买数量必须大于0!", + type: "warning", + duration: 1500 + }); + return; + } + this.$http({ + url: this.$http.adornUrl("app/user/package/order/insertOrders"), + method: "post", + // params: this.$http.adornParams({ + data: this.$http.adornData({ + ordersPackageList: [{ + packageId: this.packageId, + num: this.quantity, + }], + vipRate: this.vipRate, + oldSumMoney: this.oldSumMoney, + sumMoney: this.sumMoney, + couponId: this.couponId, + userId: this.userId, + }), + }).then(({data}) => { + if (data.code == 0) { + this.$message({ + message: "购买成功", + type: "success", + duration: 1500, + onClose: () => { + }, + }); + this.dialogFormVisibleBuy = false; + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => { + }, + }); + } + }); + }, + + showPayView(){ + this.ordersId = ""; + this.dialogFormVisiblePay = true; + }, + + handlePay(){ + this.$http({ + url: this.$http.adornUrl("app/user/package/order/payOrder"), + method: "post", + params: this.$http.adornParams({ + // data: this.$http.adornData({ + ordersId: this.ordersId, + }), + }).then(({data}) => { + if (data.code == 0) { + this.$message({ + message: "支付成功", + type: "success", + duration: 1500, + onClose: () => { + }, + }); + this.dialogFormVisiblePay = false; + } else { + this.$message({ + message: data.msg, + type: "warning", + duration: 1500, + onClose: () => { + }, + }); + } + }); + }, }, mounted() { this.handleSelect(); diff --git a/src/views/bl/order/packageOrder.vue b/src/views/bl/order/packageOrder.vue index 14b2a37..5cac050 100644 --- a/src/views/bl/order/packageOrder.vue +++ b/src/views/bl/order/packageOrder.vue @@ -66,7 +66,7 @@ 待支付 已支付 已退款 - 已取消 + 已取消 @@ -146,6 +146,16 @@ + + + +