服务包订单
This commit is contained in:
parent
7b8beb6182
commit
23ee3cfd2e
|
@ -201,6 +201,13 @@
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
>删除
|
>删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
style="margin: 5px"
|
||||||
|
@click="showBuyView(scope.row)"
|
||||||
|
>购买
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -985,6 +992,83 @@
|
||||||
</el-dialog>
|
</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="ordersNo"
|
||||||
|
type="text"
|
||||||
|
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="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>
|
||||||
|
<span style="width: 50%; display: inline-block; text-align: left">{{ packagePrice }}</span>
|
||||||
|
</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="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">
|
||||||
|
<el-button @click="dialogFormVisibleBuy = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="handleBuy()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1080,6 +1164,15 @@ export default {
|
||||||
massageLimit: 10,
|
massageLimit: 10,
|
||||||
massageImgPercentage:0,//封面图片上传进度
|
massageImgPercentage:0,//封面图片上传进度
|
||||||
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<服务项目<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
||||||
|
|
||||||
|
packageId:"",//服务包ID
|
||||||
|
ordersNo:"",//订单号
|
||||||
|
userId:"",//用户ID
|
||||||
|
quantity:0,//数量
|
||||||
|
payMoney:0,//支付金额
|
||||||
|
payWay:"",//支付方式
|
||||||
|
couponId:"",//代金券ID
|
||||||
|
dialogFormVisibleBuy: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -2091,6 +2184,61 @@ export default {
|
||||||
this.province= ""; //省
|
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() {
|
mounted() {
|
||||||
this.handleSelect();
|
this.handleSelect();
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
clearable
|
clearable
|
||||||
v-model="status"
|
v-model="status"
|
||||||
style="width: 150px; margin-left: 10px">
|
style="width: 150px; margin-left: 10px">
|
||||||
|
<el-option value="0" label="待支付"></el-option>
|
||||||
<el-option value="1" label="已支付"></el-option>
|
<el-option value="1" label="已支付"></el-option>
|
||||||
<el-option value="2" label="已退款"></el-option>
|
<el-option value="2" label="已退款"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
@ -93,6 +94,7 @@
|
||||||
<el-table-column prop="payTime" label="支付时间" width="100"></el-table-column>
|
<el-table-column prop="payTime" label="支付时间" width="100"></el-table-column>
|
||||||
<el-table-column prop="status" label="订单状态" fixed="right" width="80">
|
<el-table-column prop="status" label="订单状态" fixed="right" width="80">
|
||||||
<template slot-scope="scope">
|
<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: #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>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue