设置价格 折扣
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="add">添加会员</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="showUpdateMoney">资金转移</el-button>
|
||||
<div class="search-box">
|
||||
<el-select size="small" v-model="searchModel.schemeId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in productDiscounts"
|
||||
:key="item.Id"
|
||||
:label="item.Name"
|
||||
:value="item.Id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-input v-model="searchModel.keyWord" placeholder="请输入会员号/名称" clearable size="small">
|
||||
<el-button slot="append" icon="el-icon-search" @click="search"></el-button>
|
||||
</el-input>
|
||||
@@ -256,6 +264,7 @@ export default {
|
||||
retData: { TotalCount: 0, Data: [] },
|
||||
searchModel: {
|
||||
PageIndex: 1,
|
||||
schemeId:null,
|
||||
keyWord: ""
|
||||
},
|
||||
rules: {
|
||||
@@ -310,6 +319,12 @@ export default {
|
||||
this.$api.get(this.$api.phpURL + "user/user/getList", this.searchModel).then(res => {
|
||||
this.retData = res;
|
||||
});
|
||||
//获取折扣
|
||||
this.$api
|
||||
.get("course/v1/scheme/page")
|
||||
.then(res => {
|
||||
this.productDiscounts= res.Data;
|
||||
});
|
||||
},
|
||||
del(item) {
|
||||
var that = this;
|
||||
@@ -421,20 +436,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(){
|
||||
let user_info = this.$local.getUserByCache().Manager.RealName
|
||||
this.$api.post(this.$api.phpURL + 'logs/index/clickInfo', {
|
||||
user: user_info,
|
||||
operation: '更改折扣',
|
||||
record: '更改为'+this.currentDiscount.schemeId,
|
||||
userid: this.currentDiscount.userId
|
||||
}).then(res => {})
|
||||
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')
|
||||
|
||||
Reference in New Issue
Block a user