From 9ddad348a549154e7b328f9d7dd9517d2abd330c Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Tue, 30 Sep 2025 09:47:25 +0800
Subject: [PATCH] 1

---
 src/page/user/Warehouse/Stockdetail.vue |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/page/user/Warehouse/Stockdetail.vue b/src/page/user/Warehouse/Stockdetail.vue
index acf44a8..17dfeb5 100644
--- a/src/page/user/Warehouse/Stockdetail.vue
+++ b/src/page/user/Warehouse/Stockdetail.vue
@@ -100,7 +100,7 @@
 
         <van-popover v-model="showPopover" trigger="click" placement="top" :actions="actions" @select="onSelect">
           <template #reference>
-            <van-button type="primary"> {{ $t("一键平仓") }}</van-button>
+            <van-button type="primary"> {{ $t("平仓") }}</van-button>
           </template>
         </van-popover>
       </div>
@@ -142,9 +142,8 @@
     return {
       pages: {},
       ordernum: "",
+      actions: [{ text: this.$t('确定'), key: '1' }, { text: this.$t('取消'), key: '2' }],
       showPopover: false,
-      // 通过 actions 属性来定义菜单选项
-      actions: [{ text: '确定', key: '1' }, { text: '取消', key: '2' }],
     };
   },
   // 生命周期 - 创建完成(访问当前this实例)
@@ -203,21 +202,18 @@
         Notify({ type: "danger", message: res.msg });
       }
     },
-    // 一键平仓确认弹框
+    // 直接全部确认弹框
     onSelect(action) {
-      console.log(action.key);
       if (action.key == 1) this.oneClose();
     },
-    // 一键平仓
+    // 直接全部平仓
     async oneClose() {
       const res = await api.sell({
         positionSn: this.pages.positionSn,
         number: this.pages.orderNum
       });
       if (res.status === 0) {
-        this.finished = false;
         Notify({ type: "success", message: res.msg });
-        this.$router.go(-1);
       } else {
         Notify({ type: "danger", message: res.msg });
       }

--
Gitblit v1.9.3