From 9d7de030d38f8d71fdf54ddfe26e46e71f17e9c0 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Sat, 20 Sep 2025 15:21:43 +0800
Subject: [PATCH] 1

---
 src/views/ipo/ipo.vue |   50 +++++++++++++++++++-------------------------------
 1 files changed, 19 insertions(+), 31 deletions(-)

diff --git a/src/views/ipo/ipo.vue b/src/views/ipo/ipo.vue
index 96baa86..5228bc1 100644
--- a/src/views/ipo/ipo.vue
+++ b/src/views/ipo/ipo.vue
@@ -27,19 +27,11 @@
                 <div class="label_1">{{ $t("hj313") }}</div>
                 <div class="label_2">
                   <el-tag
-                    v-if="i.stockType == 'MEX'"
+                    :type="i.stockType != $mc ? 'success' : ''"
                     size="small"
                     style="margin-right: 8px"
                   >
-                    MEX
-                  </el-tag>
-                  <el-tag
-                    type="success"
-                    size="small"
-                    style="margin-right: 8px"
-                    v-else-if="i.stockType == 'US'"
-                  >
-                    US
+                    {{ i.stockType }}
                   </el-tag>
                   <span>{{ i.name }}</span>
                 </div>
@@ -119,15 +111,26 @@
     </template>
 
     <el-empty :description="$t('zwsj')" v-else></el-empty>
+
+    <buy
+      :dialogVisible.sync="buyVisible"
+      v-if="buyVisible"
+      :dataObj="openObj"
+      @onClose="onClose"
+    ></buy>
   </div>
 </template>
 
 <script>
+import buy from "./components/buy";
 import * as api from "@/axios/api";
 import mixins from "@/mixins/myMixins"; // 混入
 export default {
   name: "ipo",
   mixins: [mixins],
+  components: {
+    buy,
+  },
   data() {
     return {
       // 列表参数,必须是opt和myMixins混入配合使用
@@ -143,27 +146,12 @@
   methods: {
     // 打开购买弹窗
     buyOpen(i) {
-      this.$confirm("", this.$t("操作确认"), {
-        confirmButtonText: this.$t("qr"),
-        cancelButtonText: this.$t("qx"),
-      })
-        .then(async () => {
-          // 申购
-          let opt = {
-            newCode: i.code,
-            applyNums: i.orderNumber,
-            password: i.password,
-            newlistId: i.newlistId,
-            type: i.type,
-          };
-          let data = await api.getNewAdd(opt);
-
-          if (data.status == 0) {
-            this.$message.success(data.msg);
-            this.init(); // 重新获取列表
-          }
-        })
-        .catch(() => {});
+      this.openObj = i; // 赋值
+      this.buyVisible = true; // 打开弹窗
+    },
+    // 关闭弹窗
+    onClose() {
+      this.openObj = {};
     },
   },
 };

--
Gitblit v1.9.3