From c57f75664da5f522e6824023af7e5c8fbe8ed38b Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Wed, 15 May 2024 17:54:50 +0800
Subject: [PATCH] 修改:客户反馈问题

---
 src/page/list/tradingList/dazy.vue |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/page/list/tradingList/dazy.vue b/src/page/list/tradingList/dazy.vue
index 7caf392..eb0d1de 100644
--- a/src/page/list/tradingList/dazy.vue
+++ b/src/page/list/tradingList/dazy.vue
@@ -11,10 +11,11 @@
         <div class="erty tghj">
           <input
             :placeholder="$t('hj262')"
-            type="number"
+            type="text"
+            :minlength="4"
             class="inpy"
             v-model="num"
-            @input="num = num.replace(/^(0+)|[^\d]+/g, '')"
+            @input="priceinput"
           />
           <a>{{ $t("hj274") }}</a>
         </div>
@@ -47,6 +48,13 @@
 
 export default {
   methods: {
+    priceinput(e){
+      this.num = this.num.replace(/^(0+)|[^\d]+/g, '')
+      var maxnum = this.enableAmt/this.currentItem.nowPrice
+      if(this.num>=maxnum){
+        this.num = Math.floor(maxnum)
+      }
+    },
     async getxiadan() {
       if (!this.num) {
         this.show = false;
@@ -58,6 +66,7 @@
         this.$toast(this.$t("hj264"));
         return;
       }
+
       var opt = {
         stockCode: this.currentItem.code,
         password: this.password,

--
Gitblit v1.9.3