设置价格 折扣
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<el-table-column prop="ExpiredProductAccountCount" label="未过期数"></el-table-column>-->
|
||||
<!-- <el-table-column prop="ConsumeAmount" label="消费总额"></el-table-column> -->
|
||||
<el-table-column prop="RestAmount" label="余额"></el-table-column>
|
||||
<el-table-column prop="discount" label="折扣"></el-table-column>
|
||||
<el-table-column prop="RestAmount" label="测试限额/领用数">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.TestCountLimit==0?'3':scope.row.TestCountLimit}}/{{scope.row.UseTestCount==0?'--':scope.row.UseTestCount}}
|
||||
@@ -55,9 +56,10 @@
|
||||
<router-link :to="{name:'account',query:{userId:scope.row.Id}}">
|
||||
<span class="handel cursor edit">账号</span>
|
||||
</router-link>
|
||||
<router-link :to="{name:'userprice',query:{id:scope.row.Id}}">
|
||||
<!-- <router-link :to="{name:'userprice',query:{id:scope.row.Id}}">
|
||||
<span class="handel cursor edit">会员价</span>
|
||||
</router-link>
|
||||
</router-link> -->
|
||||
<span class="handel cursor edit" @click="showUserPrice(scope.row)">会员价</span>
|
||||
<span class="handel cursor edit" @click="edit(scope.row)">编辑</span>
|
||||
<span class="handel cursor edit" @click="showAmountDetail(scope.row)">明细</span>
|
||||
<el-popover @show="showHandle(scope.row)" placement="bottom" trigger="hover" width="180">
|
||||
@@ -151,6 +153,31 @@
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 用户折扣价格 -->
|
||||
<el-dialog title="设置会员折扣" :visible.sync="showPriceDialog" width="300px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
选择折扣:
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-select size="small" v-model="currentDiscount.schemeId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in productDiscounts"
|
||||
:key="item.Id"
|
||||
:label="item.Name"
|
||||
:value="item.Id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="showPriceDialog = false">取 消</el-button>
|
||||
<el-button type="primary" @click="updateDiscount()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="资金转移" :visible.sync="showMoneyDialog" width="369px">
|
||||
<el-form label-width="100px">
|
||||
<el-form-item prop="luser" label="被转移会员">
|
||||
@@ -196,8 +223,14 @@ export default {
|
||||
loading: false,
|
||||
showDialog: false,
|
||||
showTestDialog: false,
|
||||
showPriceDialog: false,
|
||||
showDetailDialog: false,
|
||||
showMoneyDialog:false,
|
||||
currentDiscount:{
|
||||
schemeId:null,
|
||||
userId:null,
|
||||
},
|
||||
productDiscounts:[],
|
||||
optype: 1, //1:添加 2:编辑
|
||||
userModel: {
|
||||
LoginCode: "",
|
||||
@@ -205,6 +238,10 @@ export default {
|
||||
Password: "",
|
||||
Remark: ""
|
||||
},
|
||||
userPrice: {
|
||||
user_id: null,
|
||||
user_discount: null
|
||||
},
|
||||
amountModel: {
|
||||
rest: 0,
|
||||
amount: 0,
|
||||
@@ -381,6 +418,24 @@ export default {
|
||||
|
||||
});
|
||||
},
|
||||
showUserPrice(r){
|
||||
this.showPriceDialog = true
|
||||
this.currentDiscount.userId = r.Id
|
||||
//获取折扣
|
||||
this.$api
|
||||
.get("course/v1/scheme/page")
|
||||
.then(res => {
|
||||
this.productDiscounts= res.Data;
|
||||
});
|
||||
},
|
||||
updateDiscount(){
|
||||
this.showPriceDialog = false
|
||||
this.$api.post(this.$api.phpURL + "user/user/setUserDiscount", this.currentDiscount).then(res => {
|
||||
this.currentDiscount.schemeId = ''
|
||||
this.currentDiscount.userId = ''
|
||||
this.get();
|
||||
});
|
||||
},
|
||||
dataExport () {
|
||||
this.$api.getDownloadFile('/baseinfo/v1/user/Export')
|
||||
// eslint-disable-next-line camelcase
|
||||
|
||||
Reference in New Issue
Block a user