From cb9eeec0baa75abb9c5e961aeb8e0c519a951f64 Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Tue, 16 Jul 2024 10:18:32 +0800
Subject: [PATCH] 123

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

diff --git a/src/page/list/tradingList/dazy.vue b/src/page/list/tradingList/dazy.vue
index ca30e06..5ac0549 100644
--- a/src/page/list/tradingList/dazy.vue
+++ b/src/page/list/tradingList/dazy.vue
@@ -3,25 +3,25 @@
     <van-popup v-model="show" round position="bottom">
       <div class="boxd">
         <div class="boxh">
-          {{ $t("hj261") }}
-
+          {{ $t("hj621") }}
           <span @click="show = false"></span>
         </div>
         <h5>{{ $t("hj130") }}</h5>
-        <h6>{{ currentItem.nowPrice ? currentItem.nowPrice : "" }}</h6>
+        <h6>{{ currentItem.nowPrice | _toString }}</h6>
         <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("hj117") }}</a>
+          <a>{{ $t("hj274") }}</a>
         </div>
         <p class="plm">
           <span>{{ $t("hj263") }}</span>
-          <a>{{ currentItem.nowPrice }}</a>
+          <a>{{ currentItem.nowPrice*num | _toString }}</a>
         </p>
         <div class="erty">
           <input
@@ -31,13 +31,11 @@
             v-model="password"
           />
         </div>
-
         <p class="plm">
           <span>
             {{ $t("hj54") }}
           </span>
-
-          <a>{{ enableAmt }}</a>
+          <a>{{ enableAmt | _toString }}</a>
         </p>
         <div class="maik" @click="getxiadan">{{ $t("hj85") }}</div>
       </div>
@@ -50,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;
@@ -61,6 +66,7 @@
         this.$toast(this.$t("hj264"));
         return;
       }
+
       var opt = {
         stockCode: this.currentItem.code,
         password: this.password,
@@ -213,4 +219,4 @@
     font-size: 0.37rem;
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3