suhp 1 месяц назад
Родитель
Сommit
7c7897ac59

+ 1 - 1
public/config.js

@@ -6,7 +6,7 @@
 // var host = 'http://b463f4b7.natappfree.cc' // 后端服务海鹏
 //var host = 'http://5jrgep.ipx.wanziwk.cn' // 后端服务译文
 // var host = 'http://192.168.1.2' // 后端服务译文
-var host = 'http://127.0.0.1:9506'
+var host = 'http://5jrgep.ipx.wanziwk.cn'
 // combine为true时五合一部署, 为false时分五个服务部署
 var combine = true
 // var gateway = '8280/stage-api'

+ 27 - 10
src/views/costAudit/auditInfo/auditManage/details.vue

@@ -25,16 +25,32 @@
         <el-tab-pane label="成本调查表" name="costSurvey">
           <cost-survey :id="id" />
         </el-tab-pane>
-        <el-tab-pane label="成本审核" name="costAudit">
+        <el-tab-pane
+          v-if="currentNode !== 'clcs'"
+          label="成本审核"
+          name="costAudit"
+        >
           <cost-audit :id="id" />
         </el-tab-pane>
-        <el-tab-pane label="工作底稿" name="workDraft">
+        <el-tab-pane
+          v-if="currentNode !== 'clcs'"
+          label="工作底稿"
+          name="workDraft"
+        >
           <work-draft :id="id" />
         </el-tab-pane>
-        <el-tab-pane label="提取材料登记" name="extractMaterial">
+        <el-tab-pane
+          v-if="currentNode !== 'clcs'"
+          label="提取材料登记"
+          name="extractMaterial"
+        >
           <extract-material :id="id" />
         </el-tab-pane>
-        <el-tab-pane label="成本审核意见" name="auditOpinion">
+        <el-tab-pane
+          v-if="currentNode !== 'clcs'"
+          label="成本审核意见"
+          name="auditOpinion"
+        >
           <audit-opinion
             :id="id"
             :current-node="currentNode"
@@ -43,6 +59,9 @@
             @close="handleClose"
           />
         </el-tab-pane>
+        <el-tab-pane label="消息通知" name="messageNotify">
+          <message-notify :id="id" />
+        </el-tab-pane>
       </el-tabs>
     </el-drawer>
   </div>
@@ -55,6 +74,7 @@
   import workDraft from './workDraft.vue'
   import extractMaterial from './extractMaterial.vue'
   import auditOpinion from './auditOpinion.vue'
+  import messageNotify from './messageNotify.vue'
   import {
     getDataPreliminaryReviewButton,
     doProcessBtn,
@@ -68,6 +88,7 @@
       workDraft,
       extractMaterial,
       auditOpinion,
+      messageNotify,
     },
     props: {
       visible: {
@@ -173,15 +194,11 @@
     methods: {
       // 根据 currentNode 和 currentStatus 设置活动标签页
       setActiveTab() {
-        // 如果 currentNode 是 'sdshenhe' 并且 currentStatus 是 '审核中',显示成本审核标签页
-        if (
-          this.currentNode === 'sdshenhe' &&
-          this.currentStatus === '审核中'
-        ) {
+        if (this.currentNode === 'sdsh' && this.currentStatus === '审核中') {
           this.activeTab = 'costAudit'
         } else if (this.currentNode === 'clcs') {
           // 如果 currentNode 是 'clcs',显示成本调查表标签页
-          this.activeTab = 'costSurvey'
+          this.activeTab = 'submitData'
         } else if (
           this.currentNode === 'yjgaozhi' ||
           this.currentNode === 'yjfk'

+ 109 - 0
src/views/costAudit/auditInfo/auditManage/messageNotify.vue

@@ -0,0 +1,109 @@
+<template>
+  <div>
+    <el-table style="width: 100%; margin-top: 20px" border :data="formData">
+      <el-table-column prop="id" label="序号" width="120" align="center">
+        <template slot-scope="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="noticeTitle"
+        label="消息主题"
+        width="200"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        prop="noticeSource"
+        label="消息来源"
+        width="150"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        prop="noticeContent"
+        label="消息内容"
+        min-width="350"
+        align="center"
+      ></el-table-column>
+      <el-table-column
+        prop="createTime"
+        label="发送时间"
+        width="230"
+        align="center"
+      ></el-table-column>
+    </el-table>
+    <el-pagination
+      background
+      layout="total, sizes, prev, pager, next"
+      :current-page="pagination.currentPage"
+      :page-sizes="[10, 20, 30, 50]"
+      :page-size="pagination.pageSize"
+      :total="pagination.total"
+      style="margin-top: 20px; text-align: right"
+      @current-change="$emit('handle-page-change', $event)"
+      @size-change="$emit('handle-size-change', $event)"
+    />
+  </div>
+</template>
+<script>
+  import { sendMessage } from '@/api/auditTaskProcessing'
+  export default {
+    name: 'MessageNoticeTab',
+    props: {
+      id: {
+        type: String,
+        default: '',
+      },
+      formData: {
+        type: Array,
+        default: () => [],
+      },
+      pagination: {
+        type: Object,
+        default: () => ({ currentPage: 1, pageSize: 10, total: 0 }),
+      },
+    },
+    mounted() {
+      this.getNoticeList()
+    },
+    methods: {
+      // 获取消息通知列表
+      async getNoticeList() {
+        if (!this.id) {
+          return
+        }
+        this.$emit('update:loading', true)
+        const params = {
+          taskId: this.id,
+          pageNum: this.pagination.currentPage,
+          pageSize: this.pagination.pageSize,
+        }
+        try {
+          const res = await sendMessage(params)
+          console.log('消息通知', res)
+          if (res && res.code === 200 && res.value) {
+            this.$emit('update:formData', res.value.records || [])
+            this.$emit('update:pagination', {
+              ...this.pagination,
+              total: res.value.total || 0,
+            })
+          } else {
+            this.$emit('update:formData', [])
+            this.$emit('update:pagination', {
+              ...this.pagination,
+              total: 0,
+            })
+          }
+        } catch (err) {
+          console.error('获取消息通知失败', err)
+          this.$emit('update:formData', [])
+          this.$emit('update:pagination', {
+            ...this.pagination,
+            total: 0,
+          })
+        } finally {
+          this.$emit('update:loading', false)
+        }
+      },
+    },
+  }
+</script>

+ 37 - 247
src/views/costAudit/auditInfo/auditManage/submitData.vue

@@ -47,10 +47,10 @@
           <template slot-scope="scope">
             <span
               :style="{
-                color: scope.row.isUploaded ? '#67C23A' : '#F56C6C',
+                color: scope.row.isUpload === '1' ? '#67C23A' : '#F56C6C',
               }"
             >
-              {{ scope.row.isUploaded ? '已上传' : '未上传' }}
+              {{ scope.row.isUpload === '1' ? '已上传' : '未上传' }}
             </span>
           </template>
         </el-table-column>
@@ -65,26 +65,27 @@
           <template slot-scope="scope">
             <span
               :class="{
-                'result-pass': scope.row.auditedStatus === '通过',
-                'result-fail': scope.row.auditedStatus === '不通过',
+                'result-pending':
+                  !scope.row.auditedStatus || scope.row.auditedStatus === '0',
+                'result-pass': scope.row.auditedStatus === '1',
+                'result-fail': scope.row.auditedStatus === '2',
               }"
             >
-              {{ scope.row.auditedStatus || '-' }}
+              {{
+                !scope.row.auditedStatus || scope.row.auditedStatus === '0'
+                  ? '未审核'
+                  : scope.row.auditedStatus === '1'
+                  ? '通过'
+                  : '不通过'
+              }}
             </span>
           </template>
         </el-table-column>
         <el-table-column label="操作" width="200" align="center">
           <template slot-scope="scope">
-            <template
-              v-if="
-                scope.row.filePath ||
-                scope.row.fileId ||
-                scope.row.fileName ||
-                scope.row.uploaded === '已上传'
-              "
-            >
+            <template v-if="scope.row.isUpload === '1'">
               <el-button
-                v-if="!scope.row.auditedStatus || scope.row.auditedStatus === 0"
+                v-if="scope.row.auditedStatus === '0'"
                 type="text"
                 size="small"
                 @click="handleAuditMaterial(scope.row)"
@@ -104,70 +105,14 @@
       </el-table>
     </div>
 
-    <!-- 初审退回弹窗 -->
-    <el-dialog
-      title="初审退回"
-      :visible.sync="showRejectDialog"
-      width="400px"
-      center
-    >
-      <el-form ref="rejectForm" :model="rejectForm" label-width="80px">
-        <el-form-item label="退回意见">
-          <el-input
-            v-model="rejectForm.opinion"
-            type="textarea"
-            :rows="4"
-            placeholder="请输入退回意见"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="发送方式">
-          <el-checkbox-group v-model="rejectForm.sendMethods">
-            <el-checkbox label="站内消息"></el-checkbox>
-            <el-checkbox label="短信通知"></el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="showRejectDialog = false">取消</el-button>
-        <el-button type="primary" @click="handleRejectSubmit">发送</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 中止监审弹窗 -->
-    <el-dialog
-      title="中止监审"
-      :visible.sync="showAbortDialog"
-      width="400px"
-      center
-    >
-      <el-form ref="abortForm" :model="abortForm" label-width="80px">
-        <el-form-item label="中止意见">
-          <el-input
-            v-model="abortForm.opinion"
-            type="textarea"
-            :rows="4"
-            placeholder="请输入中止意见"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="发送方式">
-          <el-checkbox-group v-model="abortForm.sendMethods">
-            <el-checkbox label="站内消息"></el-checkbox>
-            <el-checkbox label="短信通知"></el-checkbox>
-          </el-checkbox-group>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="showAbortDialog = false">取消</el-button>
-        <el-button type="primary" @click="handleAbortSubmit">发送</el-button>
-      </div>
-    </el-dialog>
-
     <!-- 资料审核弹窗 -->
     <el-dialog
       title="资料审核"
       :visible.sync="showAuditDialog"
       width="400px"
       center
+      :modal="false"
+      append-to-body
     >
       <div class="audit-material-info">
         <p>
@@ -180,8 +125,8 @@
       <el-form ref="auditForm" :model="auditForm" label-width="80px">
         <el-form-item label="审核结果" prop="auditedStatus">
           <el-radio-group v-model="auditForm.auditedStatus">
-            <el-radio label="通过">审核通过</el-radio>
-            <el-radio label="不通过">审核拒绝</el-radio>
+            <el-radio label="1">审核通过</el-radio>
+            <el-radio label="2">不通过</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
@@ -193,6 +138,20 @@
   </div>
 </template>
 
+<style scoped>
+  .result-pending {
+    color: #909399;
+  }
+
+  .result-pass {
+    color: #67c23a;
+  }
+
+  .result-fail {
+    color: #f56c6c;
+  }
+</style>
+
 <script>
   import {
     getTaskRequirementList,
@@ -222,13 +181,11 @@
         showRejectDialog: false, // 初审退回弹窗显示状态
         showAbortDialog: false, // 中止监审弹窗显示状态
         loading: false, // 加载状态
-
         // 初审退回表单数据
         rejectForm: {
           opinion: '在初审阶段,需补充完善相关材料。',
           sendMethods: ['站内消息', '短信通知'],
         },
-
         // 中止监审表单数据
         abortForm: {
           opinion:
@@ -244,75 +201,10 @@
         auditForm: {
           auditedStatus: '通过', // 默认审核通过
         },
-
         // 报送资料表格数据
         materialData: [],
         // 按类型分组的材料数据
         materialCategories: [],
-
-        // 成本调查表表格数据
-        costSurveyData: [
-          {
-            id: 1,
-            name: '封面',
-            type: '模板定制',
-            formType: '单记录',
-            required: '是',
-            uploaded: '已上传',
-            uploadTime: '2025-4-28 11:20',
-            auditResult: '通过',
-          },
-          {
-            id: 2,
-            name: '企业基本情况调查表',
-            type: '模板定制',
-            formType: '固定表',
-            required: '是',
-            uploaded: '已上传',
-            uploadTime: '2025-4-28 11:20',
-            auditResult: '通过',
-          },
-          {
-            id: 3,
-            name: '企业成本费用调查表',
-            type: '模板定制',
-            formType: '固定表',
-            required: '是',
-            uploaded: '已上传',
-            uploadTime: '2025-4-28 11:20',
-            auditResult: '通过',
-          },
-          {
-            id: 4,
-            name: '企业期间费用调查表',
-            type: '模板定制',
-            formType: '动态表',
-            required: '是',
-            uploaded: '已上传',
-            uploadTime: '2025-4-28 11:20',
-            auditResult: '通过',
-          },
-          {
-            id: 5,
-            name: '企业职工薪酬调查表',
-            type: '模板定制',
-            formType: '动态表',
-            required: '是',
-            uploaded: '已上传',
-            uploadTime: '2025-4-28 11:20',
-            auditResult: '不通过',
-          },
-          {
-            id: 6,
-            name: '企业资产负债调查表',
-            type: '模板定制',
-            formType: '动态表',
-            required: '是',
-            uploaded: '已上传',
-            uploadTime: '2025-4-28 11:20',
-            auditResult: '不通过',
-          },
-        ],
       }
     },
     watch: {
@@ -324,26 +216,11 @@
         }
       },
     },
-    mounted() {
-      if (this.id) {
-        this.getPreliminaryReviewButton()
-        this.loadMaterialData()
-      }
+    created() {
+      this.loadMaterialData()
     },
+    mounted() {},
     methods: {
-      // 获取资料初审按钮
-      async getPreliminaryReviewButton() {
-        const params = {
-          taskId: this.id,
-          // taskId: '1977383902654959616',
-          // processNodeKey: this.currentNode,
-          processNodeKey:
-            this.currentNode === 'ccls' ? 'clcs' : this.currentNode,
-        }
-        const response = await getDataPreliminaryReviewButton(params)
-        console.log('接口返回数据:', response)
-        this.buttonData = response.value
-      },
       // 加载报送资料数据
       async loadMaterialData() {
         try {
@@ -364,22 +241,6 @@
           this.loading = false
         }
       },
-      // 加载成本调查表数据(模拟异步加载)
-      async loadCostSurveyData() {
-        try {
-          this.loading = true
-          // 模拟网络请求延迟
-          await new Promise((resolve) => setTimeout(resolve, 500))
-          // 这里可以添加实际的API调用逻辑
-          // 目前使用已有的静态数据
-        } catch (error) {
-          console.error('获取成本调查表数据失败:', error)
-          this.$message.error('获取成本调查表数据失败')
-        } finally {
-          this.loading = false
-        }
-      },
-
       // 处理材料数据按类型分组
       processMaterialData() {
         // 确保 materialData 存在且为数组
@@ -387,15 +248,12 @@
           this.materialCategories = []
           return
         }
-
         const typeMap = {
           1: '综合性资料',
           2: '财务会计资料',
           3: '其他资料',
         }
-
         const groupedData = {}
-
         this.materialData.forEach((item) => {
           const type = item.informationType
           if (!groupedData[type]) {
@@ -407,7 +265,6 @@
           }
           groupedData[type].items.push(item)
         })
-
         // 按指定顺序排列并为每个分类下的材料重新分配序号
         this.materialCategories = []
         ;['1', '2', '3'].forEach((type) => {
@@ -420,7 +277,6 @@
           }
         })
       },
-
       // 获取格式类型
       getFormatType(formatRequired) {
         const formatMap = {
@@ -459,81 +315,22 @@
             this.$message({ type: 'info', message: '已取消操作' })
           })
       },
-
-      // 初审退回提交
-      handleRejectSubmit() {
-        if (!this.rejectForm.opinion.trim()) {
-          this.$message.error('请输入退回意见')
-          return
-        }
-
-        if (!this.rejectForm.sendMethods.length) {
-          this.$message.error('请选择发送方式')
-          return
-        }
-
-        this.$confirm('确定要退回吗?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        })
-          .then(() => {
-            // 这里可以添加初审退回的API调用逻辑
-            this.$message({ type: 'success', message: '初审退回操作已提交' })
-            this.showRejectDialog = false
-          })
-          .catch(() => {
-            this.$message({ type: 'info', message: '已取消操作' })
-          })
-      },
-
-      // 中止监审提交
-      handleAbortSubmit() {
-        if (!this.abortForm.opinion.trim()) {
-          this.$message.error('请输入中止意见')
-          return
-        }
-
-        if (!this.abortForm.sendMethods.length) {
-          this.$message.error('请选择发送方式')
-          return
-        }
-
-        this.$confirm('确定要中止监审吗?此操作不可撤销。', '警告', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'error',
-        })
-          .then(() => {
-            // 这里可以添加中止监审的API调用逻辑
-            this.$message({ type: 'success', message: '中止监审操作已提交' })
-            this.showAbortDialog = false
-          })
-          .catch(() => {
-            this.$message({ type: 'info', message: '已取消操作' })
-          })
-      },
-
       // 查看下载文件
       handleViewDownload(row) {
         this.$message.info(`查看下载文件:${row.name}`)
         // 这里可以添加查看下载文件的逻辑
       },
-
       // 查看报表
       handleViewReport(row) {
         this.$message.info(`查看报表:${row.name}`)
         // 这里可以添加查看报表的逻辑
       },
-
       // 处理资料审核点击事件
       handleAuditMaterial(row) {
         this.currentAuditMaterial = { ...row } // 复制当前行数据
         this.auditForm = {
           auditedStatus:
-            this.currentAuditMaterial.auditResult === '通过'
-              ? '通过'
-              : '不通过',
+            this.currentAuditMaterial.auditStatus === '1' ? '通过' : '不通过',
           auditOpinion: '',
         }
         this.showAuditDialog = true
@@ -563,16 +360,9 @@
           this.loading = false
         }
       },
-
-      // 返回上一页
-      handleBack() {
-        // this.$router.back();
-        this.$emit('handleBack')
-      },
     },
   }
 </script>
-
 <style scoped>
   .audit-review {
     padding: 5px;