@@ -137,6 +139,32 @@
+
+
+
+
+
+
+ 选择折扣:
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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();
+ });
+ },
}
};