diff --git a/src/components/product/pricescheme.vue b/src/components/product/pricescheme.vue index 58671bb..daf3a56 100644 --- a/src/components/product/pricescheme.vue +++ b/src/components/product/pricescheme.vue @@ -18,14 +18,14 @@ > + @@ -47,6 +47,9 @@ + + + 取 消 @@ -74,6 +77,7 @@ export default { schemeModel: { Name:'', Remark:'', + discount:100 }, types: [ ], diff --git a/src/components/user/agent.vue b/src/components/user/agent.vue index 15b838b..d754fcf 100644 --- a/src/components/user/agent.vue +++ b/src/components/user/agent.vue @@ -18,6 +18,7 @@ --> + @@ -29,9 +30,10 @@ @@ -48,6 +50,32 @@ > + + + + + + + 选择折扣: + + + + + + + + + + + 取 消 + 确定 + + + @@ -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 diff --git a/src/components/user/index.vue b/src/components/user/index.vue index d89f371..f0fc7b6 100644 --- a/src/components/user/index.vue +++ b/src/components/user/index.vue @@ -24,6 +24,7 @@ --> +