服务包订单
This commit is contained in:
parent
a41637bc75
commit
ab210afc51
|
@ -201,13 +201,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-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- style="margin: 5px"-->
|
||||||
|
<!-- @click="showPayView()"-->
|
||||||
|
<!-- >支付-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -992,83 +999,92 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
<!-- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
|
||||||
|
|
||||||
<!-- 购买 -->
|
<!-- <!– 购买 –>-->
|
||||||
<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="ordersNo"
|
<!-- v-model="userId"-->
|
||||||
type="text"
|
<!-- type="number"-->
|
||||||
min="0"
|
<!-- min="0"-->
|
||||||
placeholder="请输入订单号"
|
<!-- 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="userId"
|
<!-- v-model="vipRate"-->
|
||||||
type="number"
|
<!-- type="number"-->
|
||||||
min="0"
|
<!-- min="0"-->
|
||||||
placeholder="请输入用户ID"
|
<!-- 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>-->
|
||||||
<span style="width: 50%; display: inline-block; text-align: left">{{ packagePrice }}</span>
|
<!-- <el-input-->
|
||||||
</div>
|
<!-- style="width: 50%"-->
|
||||||
<div style="margin-bottom: 10px">
|
<!-- v-model="quantity"-->
|
||||||
<span style="width: 200px; display: inline-block; text-align: right">购买数量:</span>
|
<!-- type="number"-->
|
||||||
<el-input
|
<!-- min="0"-->
|
||||||
style="width: 50%"
|
<!-- placeholder="请输入购买数量"-->
|
||||||
v-model="quantity"
|
<!-- ></el-input>-->
|
||||||
type="number"
|
<!-- </div>-->
|
||||||
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="payMoney"
|
|
||||||
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-select
|
|
||||||
clearable
|
|
||||||
v-model="payWay"
|
|
||||||
style="width: 150px;">
|
|
||||||
<el-option value="1" label="app微信"></el-option>
|
|
||||||
<el-option value="2" label="微信公众号"></el-option>
|
|
||||||
<el-option value="3" label="微信小程序"></el-option>
|
|
||||||
<el-option value="4" label="微信公众号浏览器支付"></el-option>
|
|
||||||
<el-option value="5" label="零钱"></el-option>
|
|
||||||
<el-option value="6" label="支付宝"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</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">
|
<!-- <div style="margin-bottom: 10px">-->
|
||||||
<el-button @click="dialogFormVisibleBuy = false">取 消</el-button>
|
<!-- <span style="width: 200px; display: inline-block; text-align: right">总金额:</span>-->
|
||||||
<el-button type="primary" @click="handleBuy()">确 定</el-button>
|
<!-- <el-input-->
|
||||||
</div>
|
<!-- style="width: 50%"-->
|
||||||
</el-dialog>
|
<!-- 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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1165,14 +1181,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,
|
||||||
|
// oldSumMoney: 0,
|
||||||
|
// sumMoney: 0,
|
||||||
|
//
|
||||||
|
// ordersId: "",
|
||||||
|
// dialogFormVisiblePay: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -2187,58 +2210,98 @@ export default {
|
||||||
|
|
||||||
showBuyView(row){
|
showBuyView(row){
|
||||||
this.packageId = row.id;
|
this.packageId = row.id;
|
||||||
this.userId = "";
|
this.userId = 400;
|
||||||
this.quantity = 0;
|
this.quantity = 5;
|
||||||
this.couponId = "";
|
this.couponId = "2636,2635";
|
||||||
this.packagePrice = row.price;//单价
|
this.packagePrice = row.price;//单价
|
||||||
this.payMoney = 0;//支付金额
|
|
||||||
this.payWay = "1";//支付方式
|
this.vipRate = 90;
|
||||||
|
this.oldSumMoney = 835;
|
||||||
|
this.sumMoney = 751.5;
|
||||||
|
|
||||||
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/buy"),
|
// url: this.$http.adornUrl("app/user/package/order/insertOrders"),
|
||||||
method: "post",
|
// method: "post",
|
||||||
params: this.$http.adornParams({
|
// // params: this.$http.adornParams({
|
||||||
ordersNo: this.ordersNo,
|
// data: this.$http.adornData({
|
||||||
packageId: this.packageId,
|
// ordersPackageList: [{
|
||||||
userId: this.userId,
|
// packageId: this.packageId,
|
||||||
quantity: this.quantity,
|
// num: this.quantity,
|
||||||
payMoney: this.payMoney,
|
// }],
|
||||||
couponId: this.couponId,
|
// vipRate: this.vipRate,
|
||||||
payWay: this.payWay,
|
// oldSumMoney: this.oldSumMoney,
|
||||||
}),
|
// sumMoney: this.sumMoney,
|
||||||
}).then(({data}) => {
|
// couponId: this.couponId,
|
||||||
if (data.code == 0) {
|
// userId: this.userId,
|
||||||
this.$message({
|
// }),
|
||||||
message: "购买成功",
|
// }).then(({data}) => {
|
||||||
type: "success",
|
// if (data.code == 0) {
|
||||||
duration: 1500,
|
// this.$message({
|
||||||
onClose: () => {
|
// message: "购买成功",
|
||||||
},
|
// type: "success",
|
||||||
});
|
// duration: 1500,
|
||||||
this.dialogFormVisibleBuy = false;
|
// onClose: () => {
|
||||||
} else {
|
// },
|
||||||
this.$message({
|
// });
|
||||||
message: data.msg,
|
// this.dialogFormVisibleBuy = false;
|
||||||
type: "warning",
|
// } else {
|
||||||
duration: 1500,
|
// this.$message({
|
||||||
onClose: () => {
|
// 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();
|
||||||
|
|
|
@ -10,28 +10,6 @@
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
<div style="position: relative; display: inline-block">
|
|
||||||
<span>服务类型:</span>
|
|
||||||
<el-select
|
|
||||||
clearable
|
|
||||||
v-model="type"
|
|
||||||
style="width: 150px; margin-left: 10px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in typeDictData"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.value"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div style="position: relative; display: inline-block">
|
|
||||||
<span>服务名称:</span>
|
|
||||||
<el-input
|
|
||||||
style="width: 200px"
|
|
||||||
placeholder="请输入服务名称"
|
|
||||||
v-model="packageName">
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
<div style="position: relative; display: inline-block">
|
<div style="position: relative; display: inline-block">
|
||||||
<span>状态:</span>
|
<span>状态:</span>
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -64,20 +42,11 @@
|
||||||
<el-table-column prop="ordersId" label="编号" width="60" fixed="left"></el-table-column>
|
<el-table-column prop="ordersId" label="编号" width="60" fixed="left"></el-table-column>
|
||||||
<el-table-column prop="ordersNo" label="订单号" width="180" fixed="left"></el-table-column>
|
<el-table-column prop="ordersNo" label="订单号" width="180" fixed="left"></el-table-column>
|
||||||
<el-table-column prop="userName" label="下单用户"></el-table-column>
|
<el-table-column prop="userName" label="下单用户"></el-table-column>
|
||||||
<el-table-column prop="type" label="服务类型" width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ showDictValue(scope.row.type, typeDictData) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="packageName" label="服务名称" width="150">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="vipRate" label="会员优惠比" width="120">
|
<el-table-column prop="vipRate" label="会员优惠比" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.vipRate }}%</span>
|
<span>{{ scope.row.vipRate }}%</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="price" label="单价" width="80"></el-table-column>
|
|
||||||
<el-table-column prop="quantity" label="数量" width="80"></el-table-column>
|
|
||||||
<el-table-column prop="oldSumMoney" label="金额" width="80"></el-table-column>
|
<el-table-column prop="oldSumMoney" label="金额" width="80"></el-table-column>
|
||||||
<el-table-column prop="sumMoney" label="应付金额" width="80"></el-table-column>
|
<el-table-column prop="sumMoney" label="应付金额" width="80"></el-table-column>
|
||||||
<el-table-column prop="payMoney" label="支付金额" width="80"></el-table-column>
|
<el-table-column prop="payMoney" label="支付金额" width="80"></el-table-column>
|
||||||
|
@ -153,7 +122,7 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 显示详情 -->
|
<!-- 显示详情 需改造,订单映射表取数据在匹配服务包,再匹配服务包详情-->
|
||||||
<el-dialog title="订单项目详情" :visible.sync="dialogVisibleDetail" center>
|
<el-dialog title="订单项目详情" :visible.sync="dialogVisibleDetail" center>
|
||||||
<el-table v-loading="detailTableDataLoading" :data="detailTableData">
|
<el-table v-loading="detailTableDataLoading" :data="detailTableData">
|
||||||
<el-table-column prop="massageTypeId" label="项目编号"></el-table-column>
|
<el-table-column prop="massageTypeId" label="项目编号"></el-table-column>
|
||||||
|
|
Loading…
Reference in New Issue