shish 1 год назад
Родитель
Сommit
5793571c8c

+ 62 - 82
hdApp/src/admin/member/detail.vue

@@ -98,7 +98,7 @@
 
 
     </div>
     </div>
 
 
-    <modal-module :show="userTagModal" @cancel="modalCancel" @click="userTagModalClick" :maskClosable="false" title="客户标签" padding="30rpx 30rpx" >
+    <modal-module :show="userTagModal" @click="userTagModalClick" :maskClosable="false" title="客户标签" padding="30rpx 30rpx" >
       <template v-slot:content>
       <template v-slot:content>
         <div class="app-modal-input-wrap">
         <div class="app-modal-input-wrap">
           <view style="padding:0 8upx 10upx 8upx;">
           <view style="padding:0 8upx 10upx 8upx;">
@@ -118,26 +118,48 @@
       </template>
       </template>
     </modal-module>
     </modal-module>
 
 
-    <modal-module :show="rechargeModal" @cancel="modalCancel" @click="rechargeModalClick" :maskClosable="false" title="充值" padding="30rpx 30rpx" >
+    <modal-module :show="rechargeModal" @click="toRecharge" :maskClosable="false" title="充值" padding="30rpx 30rpx" >
       <template v-slot:content>
       <template v-slot:content>
         <div class="app-modal-input-wrap">
         <div class="app-modal-input-wrap">
           <div class="inp-list-line">
           <div class="inp-list-line">
             <div class="line-label">充值金额</div>
             <div class="line-label">充值金额</div>
             <div class="line-input">
             <div class="line-input">
-              <input type="text" placeholder="请输入金额(元)" v-model="rechargeForm.rechargeAmount" :adjust-position="false" class="inp-input" />
+              <input type="text" placeholder="请输入金额" v-model="rechargeForm.rechargeAmount" :adjust-position="false" class="inp-input" />
             </div>
             </div>
           </div>
           </div>
+          <div class="inp-list-line" style="margin-top:35upx;">
+						<div class="line-label">付款方式</div>
+						<div class="line-input">
+                <button style="margin-right:2upx;" class="admin-button-com middle" :class="[rechargeForm.payWay == 0 ? 'blue' : '']" @click="rechargeForm.payWay = 0">微 信</button>
+                <button style="margin-right:2upx;" class="admin-button-com middle" :class="[rechargeForm.payWay == 1 ? 'blue' : '']" @click="rechargeForm.payWay = 1">支付宝</button>
+                <button style="margin-right:2upx;" class="admin-button-com middle" :class="[rechargeForm.payWay == 4 ? 'blue' : '']" @click="rechargeForm.payWay = 4">现 金</button>
+                <button class="admin-button-com middle" :class="[rechargeForm.payWay == 5 ? 'blue' : '']" @click="rechargeForm.payWay = 5">银行卡</button>
+						</div>
+					</div>
           <div class="inp-list-line">
           <div class="inp-list-line">
-            <div class="line-label">确认密码</div>
+            <div class="line-label"></div>
             <div class="line-input">
             <div class="line-input">
-              <input type="password" v-model="rechargeForm.confirmPassword" :adjust-position="false" class="inp-input" />
+            <input type="text" style="text-align:center;margin-top:40upx;font-size:32upx;" v-model="rechargeForm.rechargeRemark" class="inp-input" placeholder="这里写备注" />
             </div>
             </div>
           </div>
           </div>
+
+          <view v-if="rechargeWeal == 1" style="font-size:28upx;">
+            <view v-for="(item,index) in weal" :key="index">
+              <view>充值{{ item.recharge }} 升{{ item.name }} ({{item.discount*100}}折)</view>
+            </view>
+          </view>
+
+          <view v-if="rechargeWeal == 2" style="font-size:28upx;">
+            <view v-for="(item,index) in weal" :key="index">
+              <view>充值{{ item.recharge }} 送{{ item.give }}</view>
+            </view>
+          </view>
+
         </div>
         </div>
       </template>
       </template>
     </modal-module>
     </modal-module>
     
     
-    <modal-module :show="passwordModal" @cancel="modalCancel" @click="passwordModalClick" :maskClosable="false" title="重置密码" padding="30rpx 30rpx" >
+    <modal-module :show="passwordModal" @click="passwordModalClick" :maskClosable="false" title="重置密码" padding="30rpx 30rpx" >
       <template v-slot:content>
       <template v-slot:content>
         <div class="app-modal-input-wrap">
         <div class="app-modal-input-wrap">
           <div class="inp-list-line">
           <div class="inp-list-line">
@@ -155,7 +177,7 @@
       </template>
       </template>
     </modal-module>
     </modal-module>
     
     
-    <modal-module :show="upgradeModal" @cancel="modalCancel" @click="upgradeModalClick" :maskClosable="false" title="升级" padding="30rpx 30rpx" >
+    <modal-module :show="upgradeModal" @click="upgradeModalClick" :maskClosable="false" title="升级" padding="30rpx 30rpx" >
       <template v-slot:content>
       <template v-slot:content>
         <div class="app-modal-input-wrap">
         <div class="app-modal-input-wrap">
           <div class="inp-list-line">
           <div class="inp-list-line">
@@ -177,7 +199,7 @@
       </template>
       </template>
     </modal-module>
     </modal-module>
 
 
-    <modal-module :show="remarkModal" @cancel="modalCancel" @click="remarkModalClick" :maskClosable="false" title="添加客户备注" padding="30rpx 30rpx" >
+    <modal-module :show="remarkModal" @click="remarkModalClick" :maskClosable="false" title="添加客户备注" padding="30rpx 30rpx" >
       <template v-slot:content>
       <template v-slot:content>
         <div class="app-modal-input-wrap">
         <div class="app-modal-input-wrap">
           <div class="inp-list-line">
           <div class="inp-list-line">
@@ -187,7 +209,7 @@
       </template>
       </template>
     </modal-module>
     </modal-module>
 
 
-    <modal-module :show="promptRemarkModal" @cancel="modalCancel" @click="promptModalClick" :content="promptModalText" color="#333" :size="32" padding="30rpx 30rpx" ></modal-module>
+    <modal-module :show="promptRemarkModal" @click="promptModalClick" :content="promptModalText" color="#333" :size="32" padding="30rpx 30rpx" ></modal-module>
 
 
 		<modal-module :show="changeShow" @click="confirmChange" :maskClosable="true" title="修改名称" padding="30rpx 30rpx" >
 		<modal-module :show="changeShow" @click="confirmChange" :maskClosable="true" title="修改名称" padding="30rpx 30rpx" >
 		<template v-slot:content>
 		<template v-slot:content>
@@ -211,8 +233,9 @@ import AppAvatarModule from "@/components/module/app-avatar";
 import ModalModule from "@/components/plugin/modal";
 import ModalModule from "@/components/plugin/modal";
 import { getLevel } from "@/utils/config";
 import { getLevel } from "@/utils/config";
 import TuiListCell from "@/components/plugin/list-cell";
 import TuiListCell from "@/components/plugin/list-cell";
-import { getUserDet, remarkAdd, remarkDel, upgrade, rechargeB, resetPassword } from "@/api/member";
+import { getUserDet, remarkAdd, remarkDel, upgrade, resetPassword } from "@/api/member";
 import { changeName } from "@/api/custom"
 import { changeName } from "@/api/custom"
+import { getWeal } from "@/api/member"
 export default {
 export default {
   name: "detail",
   name: "detail",
   components: {
   components: {
@@ -250,86 +273,81 @@ export default {
           name: "优惠券",
           name: "优惠券",
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           funtion: () => {
           funtion: () => {
-            this.$msg("即将开通...");
+            this.$msg("开发中");
           }
           }
         },
         },
         {
         {
           name: "老带新",
           name: "老带新",
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-2.png`,
           funtion: () => {
           funtion: () => {
-            this.$msg("即将开通...");
+            this.$msg("开发中");
           }
           }
         },
         },
         {
         {
-          name: "备注",
-          img: `${this.$constant.imgUrl}/retail/member/tab-icon-4.png`,
+          name: "充值",
+          img: `${this.$constant.imgUrl}/retail/member/tab-icon-1.png`,
           funtion: () => {
           funtion: () => {
-			      this.$msg("即将开通...")
+			      this.rechargeModal = true
           }
           }
         },
         },
         {
         {
           name: "重置密码",
           name: "重置密码",
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
           img: `${this.$constant.imgUrl}/retail/member/tab-icon-6.png`,
           funtion: () => {
           funtion: () => {
-			      this.$msg("即将开通...")
+			      this.$msg("开发中")
           }
           }
         }
         }
       ],
       ],
-      // 重置密码
       passwordForm: {
       passwordForm: {
         password: ""
         password: ""
       },
       },
-      // 充值
       rechargeForm: {
       rechargeForm: {
-        rechargeAmount: "",
-        confirmPassword: ""
+        rechargeAmount:'',
+        rechargeRemark:'',
+        payWay:0,
       },
       },
-      // 升级
       levelSelData: {},
       levelSelData: {},
       upgradeForm: {
       upgradeForm: {
         member: "",
         member: "",
         confirmPassword: ""
         confirmPassword: ""
       },
       },
-      // 备注
       remarkForm: {
       remarkForm: {
         remark: ""
         remark: ""
       },
       },
       remarkOperateData: {},
       remarkOperateData: {},
-      // 订单
       orderMoreStatus: false,
       orderMoreStatus: false,
-      // 确认操作提示
       promptRemarkModal: false,
       promptRemarkModal: false,
       promptModalText: "是否要删除该备注?",
       promptModalText: "是否要删除该备注?",
       customName:'',
       customName:'',
       changeShow:false,
       changeShow:false,
-      changeFocus:false
+      changeFocus:false,
+      weal:[],
+      rechargeWeal:0
     };
     };
   },
   },
   computed: {
   computed: {
     ...mapGetters({ levelData: "getLevel" })
     ...mapGetters({ levelData: "getLevel" })
   },
   },
   onLoad(){
   onLoad(){
-
+    getWeal().then(res=>{
+      if(res.code == 1){
+        this.weal = res.data.weal ? res.data.weal:[]
+        this.rechargeWeal = res.data.rechargeWeal ? res.data.rechargeWeal : 0
+      }
+    })
   },
   },
   onShow(){
   onShow(){
     this.init()
     this.init()
   },
   },
   methods: {
   methods: {
-		navigate(latitude, longitude, address) {   
-			// 将经纬度转换成Number
-			let latituded = Number(latitude)
-			let longituded = Number(longitude)
-			uni.openLocation({
-				latitude: latituded,
-				longitude: longituded,
-				address: address,
-				success: function() { }
-			})
-		},
+    toRecharge(e){
+      if(e.index === 0){
+        this.rechargeModal = false
+        return false
+      }
+    },
     callMobile() {
     callMobile() {
-      uni.makePhoneCall({
-        phoneNumber:this.data.mobile
-      });
+      uni.makePhoneCall({ phoneNumber:this.data.mobile })
     },
     },
 		changeNameFn(){
 		changeNameFn(){
 			this.customName = this.data.name
 			this.customName = this.data.name
@@ -384,23 +402,12 @@ export default {
         this.fundsData[2].value = res.data.buyAmount?parseFloat(res.data.buyAmount):0;
         this.fundsData[2].value = res.data.buyAmount?parseFloat(res.data.buyAmount):0;
       });
       });
     },
     },
-    _rechargeB() {
-      rechargeB({
-        userId: this.data.id,
-        ...this.rechargeForm
-      }).then(res => {
-        this.getCustomInfo();
-        this.$msg("充值成功!");
-        this.modalCancel();
-      });
-    },
     _upgrade() {
     _upgrade() {
       upgrade({
       upgrade({
         userId: this.data.id,
         userId: this.data.id,
         ...this.upgradeForm
         ...this.upgradeForm
       }).then(res => {
       }).then(res => {
         this.$msg("升级成功!");
         this.$msg("升级成功!");
-        this.modalCancel();
       });
       });
     },
     },
     _resetPassword() {
     _resetPassword() {
@@ -409,7 +416,6 @@ export default {
         ...this.passwordForm
         ...this.passwordForm
       }).then(res => {
       }).then(res => {
         this.$msg("重置成功!");
         this.$msg("重置成功!");
-        this.modalCancel();
       });
       });
     },
     },
     _remarkAdd() {
     _remarkAdd() {
@@ -418,14 +424,12 @@ export default {
         ...this.remarkForm
         ...this.remarkForm
       }).then(res => {
       }).then(res => {
         this.$msg("添加成功!");
         this.$msg("添加成功!");
-        this.modalCancel();
         this.getCustomInfo();
         this.getCustomInfo();
       });
       });
     },
     },
     _delRemark() {
     _delRemark() {
       remarkDel({ id: this.remarkOperateData.id }).then(res => {
       remarkDel({ id: this.remarkOperateData.id }).then(res => {
         this.$msg("删除成功!");
         this.$msg("删除成功!");
-        this.modalCancel();
         this.getCustomInfo();
         this.getCustomInfo();
       });
       });
     },
     },
@@ -444,48 +448,35 @@ export default {
     },
     },
     passwordModalClick(e) {
     passwordModalClick(e) {
       if (e.index === 0) {
       if (e.index === 0) {
-        this.modalCancel();
+
       } else {
       } else {
-        this.modalCancel();
         this.promptModalText = "确认重置密码?";
         this.promptModalText = "确认重置密码?";
         this.promptRemarkModal = true;
         this.promptRemarkModal = true;
       }
       }
     },
     },
     upgradeModalClick(e) {
     upgradeModalClick(e) {
       if (e.index === 0) {
       if (e.index === 0) {
-        this.modalCancel();
+
       } else {
       } else {
-        this.modalCancel();
         this.promptModalText = "确认升级?";
         this.promptModalText = "确认升级?";
         this.promptRemarkModal = true;
         this.promptRemarkModal = true;
       }
       }
     },
     },
-    rechargeModalClick(e) {
-      if (e.index === 0) {
-        this.modalCancel();
-      } else {
-        this.modalCancel();
-        this.promptModalText = "确认充值?";
-        this.promptRemarkModal = true;
-      }
-    },
     userTagModalClick(e){
     userTagModalClick(e){
       if (e.index === 0) {
       if (e.index === 0) {
-        this.modalCancel();
+
       } else {
       } else {
-        this.modalCancel();
       }
       }
     },
     },
     remarkModalClick(e) {
     remarkModalClick(e) {
       if (e.index === 0) {
       if (e.index === 0) {
-        this.modalCancel();
+
       } else {
       } else {
         this._remarkAdd();
         this._remarkAdd();
       }
       }
     },
     },
     promptModalClick(e) {
     promptModalClick(e) {
       if (e.index === 0) {
       if (e.index === 0) {
-        this.modalCancel();
       } else {
       } else {
         if (this.promptModalText == "是否要删除该备注?") {
         if (this.promptModalText == "是否要删除该备注?") {
           this._delRemark();
           this._delRemark();
@@ -493,21 +484,10 @@ export default {
         if (this.promptModalText == "确认升级?") {
         if (this.promptModalText == "确认升级?") {
           this._upgrade();
           this._upgrade();
         }
         }
-        if (this.promptModalText == "确认充值?") {
-          this._rechargeB();
-        }
         if (this.promptModalText == "确认重置密码?") {
         if (this.promptModalText == "确认重置密码?") {
           this._resetPassword();
           this._resetPassword();
         }
         }
       }
       }
-    },
-    modalCancel() {
-      this.rechargeModal = false;
-      this.userTagModal = false;
-      this.passwordModal = false;
-      this.upgradeModal = false;
-      this.remarkModal = false;
-      this.promptRemarkModal = false;
     }
     }
   }
   }
 };
 };

+ 0 - 4
hdApp/src/admin/member/discount.vue

@@ -33,10 +33,6 @@
 				天未消费降一级
 				天未消费降一级
 			</view>
 			</view>
 
 
-			<view style="margin-top:50upx;text-align: center;">
-				<view style="margin:0 auto;" class="admin-button-com big blue" @click="setRechargeDiscount">去设置充值优惠</view>
-			</view>
-
 		</view>
 		</view>
         <view class="app-footer">
         <view class="app-footer">
 			<view class="admin-button-com big blue" @click="goBack()">返回上级</view>
 			<view class="admin-button-com big blue" @click="goBack()">返回上级</view>

+ 9 - 7
hdApp/src/admin/recharge/discount.vue

@@ -62,15 +62,17 @@ export default {
 			hasMemberDiscount:0
 			hasMemberDiscount:0
 		};
 		};
 	},
 	},
+	onLoad(){
+		getRechargeData().then(res=>{
+			if(res.code == 1){
+				this.map = res.data.recharge?res.data.recharge:[]
+				this.hasMemberDiscount = res.data.hasMemberDiscount ? res.data.hasMemberDiscount : 0
+				this.rechargeWeal = res.data.rechargeWeal ? res.data.rechargeWeal : 1
+			}
+		})
+	},
 	methods: {
 	methods: {
         init(){
         init(){
-			getRechargeData().then(res=>{
-				if(res.code == 1){
-					this.map = res.data.recharge?res.data.recharge:[]
-					this.hasMemberDiscount = res.data.hasMemberDiscount ? res.data.hasMemberDiscount : 0
-					this.rechargeWeal = res.data.rechargeWeal ? res.data.rechargeWeal : 1
-				}
-			})
         },
         },
 		goBack(){
 		goBack(){
 			uni.navigateBack()
 			uni.navigateBack()

+ 4 - 0
hdApp/src/api/member/index.js

@@ -1,5 +1,9 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 import https from "@/plugins/luch-request_0.0.7/request";
 
 
+export const getWeal = data => {
+	return https.get("/member-weal/get-weal", data);
+};
+
 export const modifyRecharge = data => {
 export const modifyRecharge = data => {
 	return https.post('/member-weal/modify-recharge', data)
 	return https.post('/member-weal/modify-recharge', data)
 }
 }

+ 1 - 1
hdApp/src/pages.json

@@ -525,7 +525,7 @@
 				"pagePath": "admin/home/member",
 				"pagePath": "admin/home/member",
 				"iconPath": "static/images/common/member-no.png",
 				"iconPath": "static/images/common/member-no.png",
 				"selectedIconPath": "static/images/common/member-is.png",
 				"selectedIconPath": "static/images/common/member-is.png",
-				"text": "会员"
+				"text": "客户"
 			},
 			},
 			{
 			{
 				"pagePath": "admin/home/apply",
 				"pagePath": "admin/home/apply",