设置价格 折扣
This commit is contained in:
@@ -18,14 +18,14 @@
|
||||
>
|
||||
<el-table-column prop="Name" label="方案名称"></el-table-column>
|
||||
<el-table-column prop="Remark" label="方案说明"></el-table-column>
|
||||
<el-table-column prop="discount" label="折扣"></el-table-column>
|
||||
<el-table-column prop="CreateTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<span class="handel cursor edit" @click="edit(scope.row)">编辑</span>
|
||||
<router-link :to="{name:'pricediscount',query:{id:scope.row.Id}}">
|
||||
<!-- <router-link :to="{name:'pricediscount',query:{id:scope.row.Id}}">
|
||||
<span class="handel cursor edit">折扣</span>
|
||||
</router-link>
|
||||
<span class="handel cursor edit" @click="del(scope.row)">删除</span>
|
||||
</router-link> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -47,6 +47,9 @@
|
||||
<el-form-item prop="Remark" label="方案说明">
|
||||
<el-input v-model="schemeModel.Remark" size="small"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="discount" label="折扣">
|
||||
<el-input v-model="schemeModel.discount" size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="resetForm('inputForm')">取 消</el-button>
|
||||
@@ -74,6 +77,7 @@ export default {
|
||||
schemeModel: {
|
||||
Name:'',
|
||||
Remark:'',
|
||||
discount:100
|
||||
},
|
||||
types: [
|
||||
],
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<el-table-column prop="ExpiredProductAccountCount" label="过期数"></el-table-column>
|
||||
<el-table-column prop="ExpiredProductAccountCount" label="未过期数"></el-table-column>-->
|
||||
<!-- <el-table-column prop="ConsumeAmount" label="消费总额"></el-table-column> -->
|
||||
<el-table-column prop="discount" label="折扣"></el-table-column>
|
||||
<el-table-column prop="account" label="余额"></el-table-column>
|
||||
<el-table-column prop="realname" label="姓名"></el-table-column>
|
||||
<el-table-column prop="phone" label="电话号码"></el-table-column>
|
||||
@@ -29,9 +30,10 @@
|
||||
<template slot-scope="scope">
|
||||
<span class="handel cursor edit" @click="showAmount(scope.row,1)" v-if="IsRoot">充值</span>
|
||||
<span class="handel cursor edit" @click="showAmount(scope.row,2)">扣款</span>
|
||||
<router-link :to="{name:'agentprice',query:{id:scope.row.id}}">
|
||||
<!-- <router-link :to="{name:'agentprice',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>
|
||||
</template>
|
||||
@@ -48,6 +50,32 @@
|
||||
></el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 用户折扣价格 -->
|
||||
<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="showDialog" width="400px">
|
||||
<el-form :model="userModel" :rules="rules" ref="inputUserForm" label-width="80px">
|
||||
<el-form-item prop="username" label="用户名">
|
||||
@@ -123,7 +151,17 @@ export default {
|
||||
loading: false,
|
||||
showDialog: false,
|
||||
showTestDialog: false,
|
||||
showPriceDialog: false,
|
||||
showDetailDialog: false,
|
||||
currentDiscount:{
|
||||
schemeId:null,
|
||||
userId:null,
|
||||
},
|
||||
productDiscounts:[],
|
||||
userPrice: {
|
||||
user_id: null,
|
||||
user_discount: null
|
||||
},
|
||||
optype: 1, //1:添加 2:编辑
|
||||
userModel: {
|
||||
username: "",
|
||||
@@ -274,6 +312,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 + "agent/agent/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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<el-table-column prop="CreateTime" label="注册时间" width="160px"></el-table-column>
|
||||
<el-table-column prop="CreateType" label="注册方式" :formatter="formatterCreateType" width="109px"></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="Name" label="姓名"></el-table-column>
|
||||
<el-table-column prop="id_code" label="身份证号"></el-table-column>
|
||||
<el-table-column prop="is_verify" label="实名状态"></el-table-column>
|
||||
@@ -45,10 +46,11 @@
|
||||
<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>
|
||||
<span class="handel cursor edit" @click="edit(scope.row)">编辑</span>
|
||||
</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 placement="bottom" trigger="hover" width="180">
|
||||
<div class="popover_box">
|
||||
@@ -137,6 +139,32 @@
|
||||
</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">
|
||||
@@ -183,6 +211,16 @@ export default {
|
||||
loading: false,
|
||||
showDialog: false,
|
||||
showTestDialog: false,
|
||||
showPriceDialog: false,
|
||||
currentDiscount:{
|
||||
schemeId:null,
|
||||
userId:null,
|
||||
},
|
||||
productDiscounts:[],
|
||||
userPrice: {
|
||||
user_id: null,
|
||||
user_discount: null
|
||||
},
|
||||
showMoneyDialog:false,
|
||||
showDetailDialog: false,
|
||||
optype: 1, //1:添加 2:编辑
|
||||
@@ -351,6 +389,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();
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user