+
+ 订单号:
+
+
+
+ 用户:
+
+
+
+ 优惠价:
+ {{ packagePrice }}
+
+
+ 购买数量:
+
+
+
+ 支付金额:
+
+
+
+ 支付方式:
+
+
+
+
+
+
+
+
+
+
+ 代金卷ID:
+
+
+
+
+
+
@@ -1080,6 +1164,15 @@ export default {
massageLimit: 10,
massageImgPercentage:0,//封面图片上传进度
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+ packageId:"",//服务包ID
+ ordersNo:"",//订单号
+ userId:"",//用户ID
+ quantity:0,//数量
+ payMoney:0,//支付金额
+ payWay:"",//支付方式
+ couponId:"",//代金券ID
+ dialogFormVisibleBuy: false,
};
},
methods: {
@@ -2091,6 +2184,61 @@ export default {
this.province= ""; //省
},
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+ showBuyView(row){
+ this.packageId = row.id;
+ this.userId = "";
+ this.quantity = 0;
+ this.couponId = "";
+ this.packagePrice = row.price;//单价
+ this.payMoney = 0;//支付金额
+ this.payWay = "1";//支付方式
+ 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/buy"),
+ method: "post",
+ params: this.$http.adornParams({
+ ordersNo: this.ordersNo,
+ packageId: this.packageId,
+ userId: this.userId,
+ quantity: this.quantity,
+ payMoney: this.payMoney,
+ couponId: this.couponId,
+ payWay: this.payWay,
+ }),
+ }).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: () => {
+ },
+ });
+ }
+ });
+ },
+
},
mounted() {
this.handleSelect();
diff --git a/src/views/bl/order/packageOrder.vue b/src/views/bl/order/packageOrder.vue
index 2f6718d..8bd6f9f 100644
--- a/src/views/bl/order/packageOrder.vue
+++ b/src/views/bl/order/packageOrder.vue
@@ -38,6 +38,7 @@
clearable
v-model="status"
style="width: 150px; margin-left: 10px">
+