服务包订单查看服务包及详情数据
This commit is contained in:
parent
c0eee3e079
commit
679053f63d
|
@ -165,6 +165,32 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="addNum" label="加钟数"></el-table-column>
|
||||
<el-table-column prop="status" label="代金券可用" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isCanCoupon"
|
||||
@change="changeCoupon(scope.row.id, scope.row.isCanCoupon)"
|
||||
:active-value="openValue"
|
||||
:inactive-value="closeValue"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="VIP可用">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.isCanVip"
|
||||
@change="changeVip(scope.row.id, scope.row.isCanVip)"
|
||||
:active-value="openValue"
|
||||
:inactive-value="closeValue"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
|
@ -201,20 +227,20 @@
|
|||
@click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="danger"-->
|
||||
<!-- style="margin: 5px"-->
|
||||
<!-- @click="showBuyView(scope.row)"-->
|
||||
<!-- >购买-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="danger"-->
|
||||
<!-- style="margin: 5px"-->
|
||||
<!-- @click="showPayView()"-->
|
||||
<!-- >支付-->
|
||||
<!-- </el-button>-->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
style="margin: 5px"
|
||||
@click="showBuyView(scope.row)"
|
||||
>购买
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
style="margin: 5px"
|
||||
@click="showPayView()"
|
||||
>支付
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -999,92 +1025,92 @@
|
|||
</el-dialog>
|
||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||
|
||||
<!-- <!– 购买 –>-->
|
||||
<!-- <el-dialog title="购买" :visible.sync="dialogFormVisibleBuy" center>-->
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">用户:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="userId"-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入用户ID"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">会员优惠比:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="vipRate"-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入会员优惠比"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">购买数量:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="quantity"-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入购买数量"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- 购买 -->
|
||||
<el-dialog title="购买" :visible.sync="dialogFormVisibleBuy" center>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">用户:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="userId"
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="请输入用户ID"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">会员优惠比:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="vipRate"
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="请输入会员优惠比"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">购买数量:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="quantity"
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="请输入购买数量"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">总金额:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="oldSumMoney"-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入总金额"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">应付总金额:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="sumMoney"-->
|
||||
<!-- type="number"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入应付总金额"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">代金卷ID:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="couponId"-->
|
||||
<!-- type="text"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入代金卷ID"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">总金额:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="oldSumMoney"
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="请输入总金额"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">应付总金额:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="sumMoney"
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="请输入应付总金额"
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">代金卷ID:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="couponId"
|
||||
type="text"
|
||||
min="0"
|
||||
placeholder="请输入代金卷ID"
|
||||
></el-input>
|
||||
</div>
|
||||
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button @click="dialogFormVisibleBuy = false">取 消</el-button>-->
|
||||
<!-- <el-button type="primary" @click="handleBuy()">确 定</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-dialog>-->
|
||||
<!-- <!– 支付 –>-->
|
||||
<!-- <el-dialog title="支付" :visible.sync="dialogFormVisiblePay" center>-->
|
||||
<!-- <div style="margin-bottom: 10px">-->
|
||||
<!-- <span style="width: 200px; display: inline-block; text-align: right">订单ID:</span>-->
|
||||
<!-- <el-input-->
|
||||
<!-- style="width: 50%"-->
|
||||
<!-- v-model="ordersId"-->
|
||||
<!-- type="text"-->
|
||||
<!-- min="0"-->
|
||||
<!-- placeholder="请输入订单ID"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button @click="dialogFormVisiblePay = false">取 消</el-button>-->
|
||||
<!-- <el-button type="primary" @click="handlePay()">确 定</el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-dialog>-->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisibleBuy = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleBuy()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 支付 -->
|
||||
<el-dialog title="支付" :visible.sync="dialogFormVisiblePay" center>
|
||||
<div style="margin-bottom: 10px">
|
||||
<span style="width: 200px; display: inline-block; text-align: right">订单ID:</span>
|
||||
<el-input
|
||||
style="width: 50%"
|
||||
v-model="ordersId"
|
||||
type="text"
|
||||
min="0"
|
||||
placeholder="请输入订单ID"
|
||||
></el-input>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisiblePay = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handlePay()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -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();
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<span style="color: #f56c6c;" v-if="scope.row.status==0">待支付</span>
|
||||
<span style="color: #009900;" v-if="scope.row.status==1">已支付</span>
|
||||
<span style="color: #FF0000;" v-if="scope.row.status==2">已退款</span>
|
||||
<span style="color: #FF0000;" v-if="scope.row.status==3">已取消</span>
|
||||
<span style="color: #6f7180;" v-if="scope.row.status==3">已取消</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="couponCount" label="优惠券数量" width="120">
|
||||
|
@ -146,6 +146,16 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="oldPrice" label="原价"></el-table-column>
|
||||
<el-table-column prop="price" label="现价"></el-table-column>
|
||||
<el-table-column prop="status" label="状态1"></el-table-column>
|
||||
<el-table-column prop="status" label="状态" fixed="right" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #f56c6c;" v-if="scope.row.status==0">待支付</span>
|
||||
<span style="color: #009900;" v-if="scope.row.status==1">已支付</span>
|
||||
<span style="color: #FF0000;" v-if="scope.row.status==2">已退款</span>
|
||||
<span style="color: #6f7180;" v-if="scope.row.status==3">已无效</span>
|
||||
<span style="color: #009900;" v-if="scope.row.status==9">已用完</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" prop="id" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
Loading…
Reference in New Issue