From 83297b67cb09717d93f0c194fca5763cb3e4374f Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Thu, 28 Jan 2021 17:58:56 +0800
Subject: [PATCH] 1、修复充值问题

---
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
index fde34e1..c60267d 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
@@ -62,7 +62,7 @@
 		<el-row type="flex" align="middle" style="padding: 0 0 10px 0;">
 			<el-col :span="5" style="text-align: center;">充值金额</el-col>
 			<el-col :span="10" style="text-align: center; line-height: 50px;">
-				<el-input v-model="rechargeMoney" placeholder="0.1元起充"></el-input>
+				<el-input type="number" v-model="rechargeMoney" @change="changeRechargeMoney"  placeholder="可充负数退款"></el-input>
 			</el-col>
 		</el-row>
 
@@ -168,7 +168,7 @@
 		data : {
 			cardInfo : "",
 			loginUser : "",
-			rechargeMoney : "",
+			rechargeMoney : 0,
 			payMethods: [{
 				value: '现金支付',
 				img: '/images/pay/cash.png',
@@ -236,16 +236,18 @@
 			});
 		},
 		methods : {
+			//修改充值金额同步修改业绩
+			changeRechargeMoney(){
+				let aMoeny=(this.rechargeMoney/this.achieveList.length).toFixed(2);
+				this.achieveList.forEach(item=>{
+					item.achieveMoney=aMoeny;
+				});
+			},
 			submitRecharge() {
 				let _this = this;
 
 				if (!_this.rechargeMoney) {
 					this.$message.warning("请输入充值金额");
-					return;
-				}
-
-				if (_this.rechargeMoney < 0.1) {
-					this.$message.warning("0.1元起充");
 					return;
 				}
 
@@ -259,10 +261,11 @@
 							this.$message.warning("请输入" + item.type + "的付款金额");
 							return false;
 						}
-						flow.amount = item.money;
-						total += item.money;
+						flow.amount = parseFloat(item.money);
+						total +=   parseFloat(item.money);
 						flows.push(flow);
 					})
+					debugger
 					if (total != _this.rechargeMoney) {
 						this.$message.warning("付款金额应等于充值金额");
 						return false;
@@ -302,7 +305,7 @@
 						}
 
 						if (parent.app) {
-							parent.app.orderQuery();
+							parent.app.vipInfoFn();
 						}
 
 						_this.closeFrame();
@@ -340,10 +343,7 @@
 					return;
 				}
 
-				if (rechargeMoney < 0.1) {
-					this.$message.warning("0.1元起充");
-					return;
-				}
+
 				if (item.type != '储值卡') {
 					this.$nextTick(function () {
 						if (item.isActive) {

--
Gitblit v1.9.1