2 Commits e421086ebc ... d00adfdcdb

Author SHA1 Message Date
  wdq d00adfdcdb 合并远程 master:保留续签/续标确认提示与 09-17 变更记录。 2 days ago
  wdq 7d9d618a37 台账详情进入续签/续标前增加确认提示,并更新忽略与变更记录。 2 days ago
3 changed files with 42 additions and 3 deletions
  1. 2 0
      .gitignore
  2. 2 1
      README.md
  3. 38 2
      src/components/ledger/ProjectDetailHeader.vue

+ 2 - 0
.gitignore

@@ -4,6 +4,8 @@ node_modules
 /harness
 AGENTS.md
 sq_manage-原版.zip
+/docs
+/.cursor
 
 # local env files
 .env.local

+ 2 - 1
README.md

@@ -405,8 +405,9 @@ Internal use only.
 
 - **2026-09-16**
 1、使用AI整理代码,增加代码可读性
+2、从项目台账中进入续签或续标时,增加确认提示
 
 - **2026-09-17**
 1、项目台账列表页面,显示增加过期数据,过期数据放在最后面显示
 2、续签标列表查询功能,根据项目名称查询接口修改
-3、空间一张图加载loading状态颜色调整, 与本项目其他loading状态颜色一致
+3、空间一张图加载loading状态颜色调整, 与本项目其他loading状态颜色一致

+ 38 - 2
src/components/ledger/ProjectDetailHeader.vue

@@ -19,10 +19,10 @@
         </div>
       </div>
       <div>
-        <el-button type="primary" class="btn enter-btn" @click="emit('renew-xq')">
+        <el-button type="primary" class="btn enter-btn" @click="confirmRenew('xq')">
           进入本项目续签
         </el-button>
-        <el-button type="primary" class="btn enter-btn" @click="emit('renew-txb')">
+        <el-button type="primary" class="btn enter-btn" @click="confirmRenew('txb')">
           进入本项目续标
         </el-button>
       </div>
@@ -48,6 +48,7 @@
 <script setup lang="ts">
 import { computed } from 'vue'
 import moment from 'moment'
+import { ElMessageBox } from 'element-plus'
 
 const props = defineProps<{
   projects: any
@@ -58,6 +59,32 @@ const emit = defineEmits<{
   'renew-txb': []
 }>()
 
+/**
+ * 点击续签/续标前先确认;取消不向上抛事件(父级不会创建数据)。
+ * 确认后再 emit,由父级查重/创建并进入流程页。
+ */
+const confirmRenew = async (type: 'xq' | 'txb') => {
+  const keyword = type === 'xq' ? '续签' : '续标'
+  try {
+    await ElMessageBox.confirm(
+      `是否确认对本项目进行<span class="renew-confirm-keyword">${keyword}</span>?`,
+      '提示',
+      {
+        confirmButtonText: '确认',
+        cancelButtonText: '取消',
+        type: 'warning',
+        dangerouslyUseHTMLString: true,
+        customClass: 'project-renew-confirm-box',
+        distinguishCancelAndClose: true,
+      }
+    )
+    if (type === 'xq') emit('renew-xq')
+    else emit('renew-txb')
+  } catch {
+    // 取消或关闭:不创建、不跳转
+  }
+}
+
 /** 与原页一致:按剩余天数映射预警底色 */
 const warningClass = computed(() => {
   const days = props.projects?.days
@@ -179,3 +206,12 @@ const warningClass = computed(() => {
   color: var(--text3);
 }
 </style>
+
+<!-- MessageBox 挂到 body,需非 scoped 才能突出「续签/续标」 -->
+<style>
+.project-renew-confirm-box .renew-confirm-keyword {
+  color: var(--danger, #dc2626);
+  font-weight: 700;
+  font-size: 1.15em;
+}
+</style>