服务包订单查看服务包及详情数据

This commit is contained in:
曹磊 2024-06-13 23:26:08 +08:00
parent c0eee3e079
commit 679053f63d
2 changed files with 288 additions and 208 deletions

View File

@ -165,6 +165,32 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="addNum" label="加钟数"></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="状态"> <el-table-column prop="status" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@ -201,20 +227,20 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除 >删除
</el-button> </el-button>
<!-- <el-button--> <el-button
<!-- size="mini"--> size="mini"
<!-- type="danger"--> type="danger"
<!-- style="margin: 5px"--> style="margin: 5px"
<!-- @click="showBuyView(scope.row)"--> @click="showBuyView(scope.row)"
<!-- >购买--> >购买
<!-- </el-button>--> </el-button>
<!-- <el-button--> <el-button
<!-- size="mini"--> size="mini"
<!-- type="danger"--> type="danger"
<!-- style="margin: 5px"--> style="margin: 5px"
<!-- @click="showPayView()"--> @click="showPayView()"
<!-- >支付--> >支付
<!-- </el-button>--> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -999,92 +1025,92 @@
</el-dialog> </el-dialog>
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< --> <!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
<!-- &lt;!&ndash; 购买 &ndash;&gt;--> <!-- 购买 -->
<!-- <el-dialog title="购买" :visible.sync="dialogFormVisibleBuy" center>--> <el-dialog title="购买" :visible.sync="dialogFormVisibleBuy" center>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">用户</span>--> <span style="width: 200px; display: inline-block; text-align: right">用户</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="userId"--> v-model="userId"
<!-- type="number"--> type="number"
<!-- min="0"--> min="0"
<!-- placeholder="请输入用户ID"--> placeholder="请输入用户ID"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">会员优惠比</span>--> <span style="width: 200px; display: inline-block; text-align: right">会员优惠比</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="vipRate"--> v-model="vipRate"
<!-- type="number"--> type="number"
<!-- min="0"--> min="0"
<!-- placeholder="请输入会员优惠比"--> placeholder="请输入会员优惠比"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">购买数量</span>--> <span style="width: 200px; display: inline-block; text-align: right">购买数量</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="quantity"--> v-model="quantity"
<!-- type="number"--> type="number"
<!-- min="0"--> min="0"
<!-- placeholder="请输入购买数量"--> placeholder="请输入购买数量"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">总金额</span>--> <span style="width: 200px; display: inline-block; text-align: right">总金额</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="oldSumMoney"--> v-model="oldSumMoney"
<!-- type="number"--> type="number"
<!-- min="0"--> min="0"
<!-- placeholder="请输入总金额"--> placeholder="请输入总金额"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">应付总金额</span>--> <span style="width: 200px; display: inline-block; text-align: right">应付总金额</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="sumMoney"--> v-model="sumMoney"
<!-- type="number"--> type="number"
<!-- min="0"--> min="0"
<!-- placeholder="请输入应付总金额"--> placeholder="请输入应付总金额"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">代金卷ID</span>--> <span style="width: 200px; display: inline-block; text-align: right">代金卷ID</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="couponId"--> v-model="couponId"
<!-- type="text"--> type="text"
<!-- min="0"--> min="0"
<!-- placeholder="请输入代金卷ID"--> placeholder="请输入代金卷ID"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div slot="footer" class="dialog-footer">--> <div slot="footer" class="dialog-footer">
<!-- <el-button @click="dialogFormVisibleBuy = false"> </el-button>--> <el-button @click="dialogFormVisibleBuy = false"> </el-button>
<!-- <el-button type="primary" @click="handleBuy()"> </el-button>--> <el-button type="primary" @click="handleBuy()"> </el-button>
<!-- </div>--> </div>
<!-- </el-dialog>--> </el-dialog>
<!-- &lt;!&ndash; 支付 &ndash;&gt;--> <!-- 支付 -->
<!-- <el-dialog title="支付" :visible.sync="dialogFormVisiblePay" center>--> <el-dialog title="支付" :visible.sync="dialogFormVisiblePay" center>
<!-- <div style="margin-bottom: 10px">--> <div style="margin-bottom: 10px">
<!-- <span style="width: 200px; display: inline-block; text-align: right">订单ID</span>--> <span style="width: 200px; display: inline-block; text-align: right">订单ID</span>
<!-- <el-input--> <el-input
<!-- style="width: 50%"--> style="width: 50%"
<!-- v-model="ordersId"--> v-model="ordersId"
<!-- type="text"--> type="text"
<!-- min="0"--> min="0"
<!-- placeholder="请输入订单ID"--> placeholder="请输入订单ID"
<!-- ></el-input>--> ></el-input>
<!-- </div>--> </div>
<!-- <div slot="footer" class="dialog-footer">--> <div slot="footer" class="dialog-footer">
<!-- <el-button @click="dialogFormVisiblePay = false"> </el-button>--> <el-button @click="dialogFormVisiblePay = false"> </el-button>
<!-- <el-button type="primary" @click="handlePay()"> </el-button>--> <el-button type="primary" @click="handlePay()"> </el-button>
<!-- </div>--> </div>
<!-- </el-dialog>--> </el-dialog>
</div> </div>
</template> </template>
@ -1181,21 +1207,21 @@ export default {
massageImgPercentage:0,// massageImgPercentage:0,//
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// packageId:"",//ID packageId:"",//ID
// ordersNo:"",// ordersNo:"",//
// userId:"",//ID userId:"",//ID
// quantity:0,// quantity:0,//
// payMoney:0,// payMoney:0,//
// payWay:"",// payWay:"",//
// couponId:"",//ID couponId:"",//ID
// dialogFormVisibleBuy: false, dialogFormVisibleBuy: false,
//
// vipRate: 100, vipRate: 100,
// oldSumMoney: 0, oldSumMoney: 0,
// sumMoney: 0, sumMoney: 0,
//
// ordersId: "", ordersId: "",
// dialogFormVisiblePay: false, dialogFormVisiblePay: false,
}; };
}, },
methods: { 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) { changeStatus(id, status) {
this.$http({ this.$http({
@ -2208,100 +2278,100 @@ export default {
}, },
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// showBuyView(row){ showBuyView(row){
// this.packageId = row.id; this.packageId = row.id;
// this.userId = 400; this.userId = 400;
// this.quantity = 5; this.quantity = 5;
// this.couponId = "2636,2635"; this.couponId = "2636,2635";
// this.packagePrice = row.price;// this.packagePrice = row.price;//
//
// this.vipRate = 90; this.vipRate = 90;
// this.oldSumMoney = 835; this.oldSumMoney = 985;
// this.sumMoney = 751.5; this.sumMoney = 835;
//
// this.dialogFormVisibleBuy = true; this.dialogFormVisibleBuy = true;
// }, },
//
// handleBuy(){ handleBuy(){
// if(this.quantity <= 0){ if(this.quantity <= 0){
// this.$message({ this.$message({
// message: "0", message: "购买失败购买数量必须大于0",
// type: "warning", type: "warning",
// duration: 1500 duration: 1500
// }); });
// return; return;
// } }
// this.$http({ this.$http({
// url: this.$http.adornUrl("app/user/package/order/insertOrders"), url: this.$http.adornUrl("app/user/package/order/insertOrders"),
// method: "post", 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({ // params: this.$http.adornParams({
// // data: this.$http.adornData({ data: this.$http.adornData({
// ordersId: this.ordersId, ordersPackageList: [{
// }), packageId: this.packageId,
// }).then(({data}) => { num: this.quantity,
// if (data.code == 0) { }],
// this.$message({ vipRate: this.vipRate,
// message: "", oldSumMoney: this.oldSumMoney,
// type: "success", sumMoney: this.sumMoney,
// duration: 1500, couponId: this.couponId,
// onClose: () => { userId: this.userId,
// }, }),
// }); }).then(({data}) => {
// this.dialogFormVisiblePay = false; if (data.code == 0) {
// } else { this.$message({
// this.$message({ message: "购买成功",
// message: data.msg, type: "success",
// type: "warning", duration: 1500,
// duration: 1500, onClose: () => {
// 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() { mounted() {
this.handleSelect(); this.handleSelect();

View File

@ -66,7 +66,7 @@
<span style="color: #f56c6c;" v-if="scope.row.status==0">待支付</span> <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: #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==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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="couponCount" label="优惠券数量" width="120"> <el-table-column prop="couponCount" label="优惠券数量" width="120">
@ -146,6 +146,16 @@
</el-table-column> </el-table-column>
<el-table-column prop="oldPrice" label="原价"></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="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"> <el-table-column label="操作" prop="id" width="100" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button