7
0

2 Commits c0a9a36057 ... 73e4458351

Autor SHA1 Nachricht Datum
  shiyanyu 73e4458351 Merge branch 'master' of http://1.71.9.215:3000/feiyi/cbjsxt-front-master vor 1 Woche
  shiyanyu e089af3878 fix: 修改bug vor 1 Woche

+ 11 - 0
src/api/costFormManage.js

@@ -175,3 +175,14 @@ export function batchSaveOrUpdate(data) {
     data,
   })
 }
+
+// 判断按钮
+export function getCostVerifyTemplate(data) {
+  return request({
+    url: `${url}/api/surveyTemplate/v1/checkVerifyValueColumn`,
+    method: 'get',
+    params: {
+      ...data,
+    },
+  })
+}

+ 1 - 0
src/views/EntDeclaration/auditTaskManagement/taskFillIn.vue

@@ -1923,6 +1923,7 @@
               fileUrl: this.materialForm.fileUrl,
               templateId: this.materialForm.templateId,
               taskNode: this.localTaskInfo.currentNode,
+              auditedStatus: 0,
             })
               .then((res) => {
                 // console.log('补充材料提交成功', res)

+ 49 - 4
src/views/costAudit/auditInfo/auditManage/costAudit.vue

@@ -83,13 +83,28 @@
       >
         保存核定模版
       </el-button>
-      <el-button type="primary" size="small" @click="handleExportTemplate">
+      <el-button
+        v-if="showButtons"
+        type="primary"
+        size="small"
+        @click="handleExportTemplate"
+      >
         导出模版
       </el-button>
-      <el-button type="primary" size="small" @click="handleImportData">
+      <el-button
+        v-if="showButtons"
+        type="primary"
+        size="small"
+        @click="handleImportData"
+      >
         导入数据
       </el-button>
-      <el-button type="primary" size="small" @click="handleSaveData">
+      <el-button
+        v-if="showButtons"
+        type="primary"
+        size="small"
+        @click="handleSaveData"
+      >
         保存核定数据
       </el-button>
     </div>
@@ -298,6 +313,7 @@
     getCostFormVersionsByTemplateId,
     getCostVerifyTemplateDetailByTaskId,
     batchSaveOrUpdate,
+    getCostVerifyTemplate,
   } from '@/api/costFormManage'
   import {
     getlistBySurveyTemplateId,
@@ -391,6 +407,8 @@
         dictCache: {},
         // 生成核定表时的加载状态
         loading: false,
+        // 控制按钮显示的标志
+        showButtons: false,
       }
     },
     computed: {
@@ -433,10 +451,14 @@
     mounted() {
       // 进入页签时,不论是否已有ID,都尝试解析并加载一次
       this.getDetail()
+      // 检查按钮显示权限
+      this.checkButtonVisibility()
     },
     activated() {
       // keep-alive 场景下,激活时同样尝试解析并加载
       this.getDetail()
+      // 检查按钮显示权限
+      this.checkButtonVisibility()
     },
     methods: {
       // 尝试从多来源解析模板ID
@@ -1318,12 +1340,14 @@
           itemsList: splitData,
         }
         batchSaveOrUpdate(data)
-          .then((data) => {
+          .then(async (data) => {
             // 关闭加载状态
             this.$loading().close()
             if (type != 'delete') {
               this.$message.success('保存成功')
               this.loadTemplateData()
+              // 保存成功后重新检查按钮显示权限
+              await this.checkButtonVisibility()
             }
           })
           .catch((err) => {
@@ -1650,6 +1674,7 @@
 
         downloadTemplate(params)
           .then((res) => {
+            console.log('downloadTemplate res:', res)
             const headers = (res && res.headers) || {}
             const contentDisposition =
               headers['content-disposition'] || headers['Content-Disposition']
@@ -2093,6 +2118,26 @@
         if (t === 'year') return fmt || 'yyyy'
         return fmt || 'yyyy-MM-dd'
       },
+      // 检查按钮显示权限
+      async checkButtonVisibility() {
+        try {
+          const taskId =
+            (this.selectedProject && this.selectedProject.taskId) ||
+            this.id ||
+            ''
+          if (!taskId) {
+            this.showButtons = false
+            return
+          }
+          const response = await getCostVerifyTemplate({ taskId })
+          console.log('response', response)
+          // 根据接口返回值设置按钮显示状态
+          this.showButtons = !!(response && response.value)
+        } catch (error) {
+          console.error('检查按钮显示权限失败:', error)
+          this.showButtons = false
+        }
+      },
     },
   }
 </script>

+ 2 - 4
src/views/costAudit/auditInfo/auditManage/index.vue

@@ -154,9 +154,7 @@
                 意见告知
               </el-button>
               <el-button
-                v-if="
-                  scope.row.currentNode === 'jtsy' && scope.row.status === '200'
-                "
+                v-if="scope.row.status === '666'"
                 type="text"
                 @click="handleOpenDetails(scope.row, 'shenhe')"
               >
@@ -164,7 +162,7 @@
               </el-button>
               <el-button
                 v-if="
-                  scope.row.currentNode === 'jtsy' && scope.row.status === '260'
+                  scope.row.currentNode === 'yjfk' && scope.row.status === '260'
                 "
                 type="text"
                 @click="handleOpenDetails(scope.row, 'auditOpinion')"

+ 19 - 3
src/views/costAudit/projectInfo/auditTaskManage/taskProgressManage/index.vue

@@ -99,7 +99,11 @@
               详情
             </el-button>
             <el-button
-              v-if="row.status != 400 && row.status != 300"
+              v-if="
+                row.status != 400 &&
+                row.status != 300 &&
+                row.currentNode !== 'gd'
+              "
               size="mini"
               type="text"
               @click="handlePause(row)"
@@ -114,7 +118,11 @@
               恢复
             </el-button>
             <el-button
-              v-if="row.status != 400 && row.status != 300"
+              v-if="
+                row.status != 400 &&
+                row.status != 300 &&
+                row.currentNode !== 'gd'
+              "
               size="mini"
               type="text"
               @click="handleDelegate(row)"
@@ -122,7 +130,11 @@
               催办
             </el-button>
             <el-button
-              v-if="row.status != 400 && row.status != 300"
+              v-if="
+                row.status != 400 &&
+                row.status != 300 &&
+                row.currentNode !== 'gd'
+              "
               size="mini"
               type="text"
               @click="handleUrge(row)"
@@ -477,6 +489,10 @@
             formatter: (row) => {
               const left = row.currentNodeName || ''
               const right = row.statusName || this.getStatusName(row.status)
+              // 当 currentNode 是 'gd' 时,只显示 currentNodeName,不显示 -statusName
+              if (row.currentNode === 'gd') {
+                return left || right
+              }
               return left ? `${left}-${right}` : right
             },
           },

+ 6 - 6
src/views/personal/notice/index.vue

@@ -122,18 +122,18 @@
                 {{ form.noticeSource }}
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <!-- <el-col :span="12">
               <el-form-item label="发送对象:">
                 {{ getUserName(form.sendTarget) }}
               </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row :gutter="20">
+            </el-col> -->
             <el-col :span="12">
               <el-form-item label="状态:">
                 {{ form.status == '0' ? '未读' : '已读' }}
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="发送时间:">
                 {{ form.createTime }}
@@ -144,13 +144,13 @@
                 {{ form.createBy }}
               </el-form-item>
             </el-col> -->
-          </el-row>
-          <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="项目名称:">
                 {{ form.projectName }}
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="被监审单位名称:">
                 {{ form.enterpriseName }}