From f8e9af35a267b7b9a2bf605187a11536889a6e38 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Mon, 20 May 2024 11:00:10 +0800
Subject: [PATCH] 修改:绑定银行卡 多语言

---
 src/page/list/favoriteslist/data.list.vue |  156 ++++++++++++++++++++++++++++++++-------------------
 1 files changed, 97 insertions(+), 59 deletions(-)

diff --git a/src/page/list/favoriteslist/data.list.vue b/src/page/list/favoriteslist/data.list.vue
index aa29a4e..55568ec 100644
--- a/src/page/list/favoriteslist/data.list.vue
+++ b/src/page/list/favoriteslist/data.list.vue
@@ -2,8 +2,8 @@
   <div class="list-data">
     <div class="header-box">
       <van-list
-        v-model="loadings"
         :finished-text="$t('hj43')"
+        :loading-text="$t('hj430')"
         :immediate-check="false"
       >
         <div
@@ -14,8 +14,12 @@
         >
           <div class="tabs_o_items">
             <div class="tabs_o_title">
-              <span class="title">{{ item.newName }}</span>
-              <span class="buy_to_sell mairu">{{ $t("hj45") }}</span>
+              <div class="title">
+                {{ item.newName }}
+              </div>
+              <span class="buy_to_sell mairu">{{
+                item.type === 1 ? $t("hj45") : $t("新股配售")
+              }}</span>
             </div>
             <div
               style="
@@ -27,36 +31,67 @@
               <div style="width: 100%">
                 <div class="bottom_price_title">
                   <div class="start_price">
-                    <span>{{ item.buyPrice }} </span>
+                    <span>{{ item.buyPrice | _toLocaleString(false) }} </span>
                   </div>
-                  <div class="new_price">
-                    <span>{{ item.applyNums }}</span>
+                  <div class="new_price" v-if="item.status <= 3">
+                    <span>
+                      {{ item.applyNums }}
+                    </span>
+                  </div>
+                  <div class="new_price" v-if="item.status >= 3">
+                    <span>
+                      {{ item.applyNumber }}
+                    </span>
+                  </div>
+                  <div class="new_price" v-if="item.status === 4">
+                    <span style="color: red">
+                      {{ item.dbMoney }}
+                    </span>
                   </div>
                 </div>
                 <div class="bottom_price_title">
                   <div class="start_price">
                     <span>{{ $t("單筆價格") }}</span>
                   </div>
-                  <div class="new_price">
-                    <span>{{ $t("hj57") }}</span>
+                  <div class="new_price" v-if="item.status <= 3">
+                    <span>
+                      {{ $t("hj57") }}
+                    </span>
+                  </div>
+                  <div class="new_price" v-if="item.status >= 3">
+                    <span>
+                      {{ $t("hj253") }}
+                    </span>
+                  </div>
+                  <div class="new_price" v-if="item.status === 4">
+                    <span style="color: red">
+                      {{ $t("待补金额") }}
+                    </span>
                   </div>
                 </div>
               </div>
               <div class="right_btn pink" style="padding: 0px 0.2rem">
-                <span>{{
-                  item.status == 1
-                    ? $t("hj131")
-                    : item.status == 2
-                    ? $t("hj132")
-                    : item.status == 3
-                    ? $t("hj133")
-                    : item.status == 4
-                    ? $t("hj134")
-                    : item.status == 5
-                    ? $t("hj135")
-                    : ""
-                }}</span>
+                <span>
+                  {{
+                    item.status == 1
+                      ? $t("hj131")
+                      : item.status == 2
+                      ? $t("hj132")
+                      : item.status == 3
+                      ? $t("hj133")
+                      : item.status == 4
+                      ? $t("待上市")
+                      : item.status == 5
+                      ? $t("hj135")
+                      : ""
+                  }}
+                </span>
+
+                <!-- <van-button v-else type="primary">
+                  {{ $t("hj250") }}</van-button
+                > -->
               </div>
+
               <!---->
             </div>
           </div>
@@ -69,9 +104,13 @@
 <script>
 import * as api from "@/axios/api";
 import handleDt from "@/utils/deTh";
+import { Dialog, Notify } from "vant";
 
 // getNewAdd
 export default {
+  components: {
+    [Dialog.Component.name]: Dialog.Component,
+  },
   props: {
     active: {
       type: String,
@@ -109,7 +148,7 @@
       fromData: {
         value: 1,
       },
-      loadings: false,
+      loading: false,
       show: false,
       finished: false,
       listArr: [],
@@ -124,6 +163,32 @@
     this.getStock(this.active, this.zxactive);
   },
   methods: {
+    renjiao(item) {
+      if (item.status !== 3) {
+        return;
+      }
+      Dialog.confirm({
+        title: this.$t("提示"),
+        message: this.$t("是否认缴"),
+        confirmButtonText: this.$t("确定"),
+        cancelButtonText: this.$t("取消"),
+      })
+        .then(async () => {
+          const res = await api.submitSubscribe({
+            id: item.id,
+          });
+          if (res.status === 0) {
+            Notify({ type: "success", message: this.$t("认购成功") });
+            this.getStock(this.active, this.zxactive);
+          } else {
+            Notify({ type: "danger", message: this.$t(res.msg) });
+          }
+          // 认购成功
+        })
+        .catch(() => {
+          // on cancel
+        });
+    },
     fromDatavalue(e) {
       this.fromData.value = e.target.value;
     },
@@ -142,44 +207,15 @@
 
     // 获取列表
     getStock: handleDt.debounce(async function (a, b) {
-      a = this.active;
-      let stockType = "";
-      console.log(this.tabsList, a, this.active);
-      if (a !== "") {
-        let array = this.tabsList.filter((item) => item.key === a);
-        stockType = array[0].name;
-      }
-      let opt = {
-        // pageNum: this.pageNumVal,
-        // pageSize: 15,
-        // stockPlate: "",
-        keyWords: this.sousuo,
-        // stockType: stockType,
-        // orderBy: "",
-      };
       let data = await api.getUserNewGuList();
-      this.loading = false;
       if (data.status === 0) {
-        if (this.listArr.length >= data.data.total) {
-          this.finished = true;
-        }
-        if (this.pageNumVal !== 1) {
-          this.listArr = [...this.listArr, ...data.data];
-        } else {
-          this.listArr = data.data;
-        }
-      } else {
-        this.loading = false;
-        this.finished = true;
+        this.listArr = data.data;
       }
+      console.log(2222222);
+      this.loading = false;
+      this.finished = false;
     }, 500),
-    onLoads() {
-      if (!this.loading) {
-        this.pageNumVal++;
-        this.loading = true;
-        this.getStock();
-      }
-    },
+    onLoads() {},
     optionszx() {},
   },
 };
@@ -201,7 +237,7 @@
     align-items: center;
     -webkit-box-pack: justify;
     -ms-flex-pack: justify;
-    justify-content: space-between;
+    // justify-content: space-between;
     span {
       display: inline-block;
       margin-right: 0.2rem;
@@ -220,8 +256,10 @@
     }
   }
   .right_btn {
-    width: 1.9949rem;
-    height: 0.6667rem;
+    width: 110px;
+    margin-left: 10px;
+    min-height: 0.6667rem;
+    padding: 15px 0;
     right: 1%;
     top: 27%;
     display: -webkit-box;

--
Gitblit v1.9.3