From 895ad285b1a272328f68580ece713a95b0c53b6b Mon Sep 17 00:00:00 2001
From: 1154079537 <1154079537@qq.com>
Date: Wed, 8 May 2024 16:46:05 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E7=8E=B0=E8=BE=93=E5=85=A5=20bug?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/withdrawal/index.vue | 27 ++++++++++++++++++++++++---
pages/withdrawal/progress.vue | 3 ---
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/pages/withdrawal/index.vue b/pages/withdrawal/index.vue
index 6d594e1..741b3e1 100644
--- a/pages/withdrawal/index.vue
+++ b/pages/withdrawal/index.vue
@@ -53,8 +53,8 @@
提现金额
-
+
@@ -96,7 +96,7 @@
提现金额
-
@@ -180,6 +180,7 @@
financial_type: 1,
withdrawal_pwd: "",
},
+ value: '12311',
mer_id: '',
ot_margin: '', //押金
extract_money: '', //可提现金额
@@ -201,6 +202,26 @@
},
methods: {
+ limitDecimalToTwo(input) {
+ console.log(input);
+ var regex = /^(\d+)?(\.\d{1,2})?$/;
+ var cleanInput = input.value.replace(regex, '$1$2');
+ if (cleanInput !== input.value) {
+ input.value = cleanInput;
+ };
+ },
+
+ // 限制输入两个小数
+ onInput(e) {
+ let value = e.target.value;
+ // 使用正则表达式限制只能输入两位小数
+ value = value.replace(/^(\-)*(\d+)\.(\d{2}).*$/, '$1$2.$3');
+ this.$nextTick(() => {
+ this.payForm.extract_money = value;
+ })
+ this.$forceUpdate();
+ },
+
//添加账户
isShowAdd() {
if (this.bankList.length == 0) return true;
diff --git a/pages/withdrawal/progress.vue b/pages/withdrawal/progress.vue
index e1fe213..8a9d2e3 100644
--- a/pages/withdrawal/progress.vue
+++ b/pages/withdrawal/progress.vue
@@ -100,11 +100,8 @@
handleToUpdate(item) {
//如果绑定银行卡用户为个体户 则不能添加对公账户,只能添加法人账户 is_company =0 个体户
const isCompany = JSON.parse(this.$Cache.get("USER_INFO")).mer_info.is_company;
- if (isCompany != 1 && item.is_own === 0) return;
-
let strUrl = "?mer_id=" + this.mer_id;
strUrl += "&id=" + item.id
-
uni.redirectTo({
url: "/pages/withdrawal/add" + strUrl
})