Browse Source

fix:修改监审文书的问题

luzhixia 1 month ago
parent
commit
ed1c9ab8ea

+ 4 - 4
src/components/task/mounTaskComponents/auditNoticeTab.vue

@@ -71,9 +71,9 @@
           </template>
           <template #feedbackDocumentUrl="scope">
             <div v-if="getDocumenType(scope.row).includes('送达回证')">
-              <span>
+              <!-- <span>
                 {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-              </span>
+              </span> -->
               <el-button
                 v-if="scope.row.feedbackDocumentUrl"
                 type="text"
@@ -114,9 +114,9 @@
         </CostAuditTable>
       </div>
     </div>
-    <div style="margin-top: 20px; font-size: 14px" class="table-description">
+    <!-- <div style="margin-top: 20px; font-size: 14px" class="table-description">
       说明:此处只能生成各被监审单位的《成本监审通知书》和《送达回证》,同时接收或上传被监审单位的反馈的《送达回证》。
-    </div>
+    </div> -->
 
     <!-- 编辑监审通知书 -->
     <CostAuditDialog

+ 69 - 30
src/components/task/taskComponents/auditNoticeTab.vue

@@ -1,6 +1,7 @@
 <template>
   <div class="catalog-manage">
     <div class="documents-layout">
+      <!--成本审核管理-任务详情-监审文书 -->
       <!-- 左侧文书类型列表 -->
       <div class="documents-type-list">
         <h3>监审文书类型:</h3>
@@ -43,8 +44,17 @@
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}
           </template>
+          <template #generateTime="{ row }">
+            <div>
+              {{ row.generateTime ? row.generateTime.split(' ')[0] : '' }}
+            </div>
+            <div>
+              {{ row.generateTime ? row.generateTime.split(' ')[1] : '' }}
+            </div>
+          </template>
           <template #scanDocumentUrl="scope">
             <el-button
+              v-if="!isView && getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               :disabled="isView"
@@ -71,44 +81,55 @@
             >
               上传附件
             </el-button> -->
+            <div v-if="getDocumenType(scope.row).includes('送达回证')">
+              <el-button
+                v-if="scope.row.feedbackDocumentUrl"
+                type="text"
+                size="mini"
+                @click="
+                  handleViewScan(
+                    scope.row.feedbackDocumentUrl,
+                    'feedbackDocumentUrl'
+                  )
+                "
+              >
+                查看附件
+              </el-button>
+            </div>
+          </template>
+          <template #electronicDocumentUrl="scope">
+            <!-- 查看 -->
             <el-button
               type="text"
               size="mini"
-              @click="
-                handleViewScan(
-                  scope.row.feedbackDocumentUrl,
-                  'feedbackDocumentUrl'
-                )
-              "
+              @click="handleDocView(scope.row)"
             >
-              查看附件
+              查看
             </el-button>
-          </template>
-          <template #electronicDocumentUrl="scope">
-            <el-button
+            <!-- <el-button
               type="text"
               size="mini"
               :disabled="isView"
               @click="handleEditDocument(scope.row)"
             >
               修改
-            </el-button>
-            <el-button
+            </el-button> -->
+            <!-- <el-button
               type="text"
               size="mini"
               :disabled="isView"
               @click="handleSignDocument(scope.row)"
             >
               签章
-            </el-button>
-            <el-button
+            </el-button> -->
+            <!-- <el-button
               type="text"
               size="mini"
               :disabled="isView"
               @click="handleDeleteDocument(scope.row)"
             >
               删除
-            </el-button>
+            </el-button> -->
             <el-button
               type="text"
               size="mini"
@@ -120,9 +141,9 @@
         </CostAuditTable>
       </div>
     </div>
-    <div style="margin-top: 20px; font-size: 14px" class="table-description">
+    <!-- <div style="margin-top: 20px; font-size: 14px" class="table-description">
       说明:此处只能生成各被监审单位的《成本监审通知书》和《送达回证》,同时接收或上传被监审单位的反馈的《送达回证》。
-    </div>
+    </div> -->
 
     <!-- 编辑监审通知书 -->
     <CostAuditDialog
@@ -130,6 +151,7 @@
       :visible="documentDialogVisible"
       :width="dialogWidth"
       :close-on-click-modal="false"
+      :z-index="9300"
       @cancel="handleCancel"
       @confirm="handleConfirm"
     >
@@ -143,9 +165,10 @@
             label-width="170px"
             size="small"
             :rules="documentRules"
+            :disabled="true"
           >
             <el-form-item label="选择模板:" prop="documentId">
-              <el-select
+              <!-- <el-select
                 v-model="document.documentId"
                 placeholder="请选择模板"
                 style="width: 100%"
@@ -157,15 +180,17 @@
                   :label="item.documentName"
                   :value="item.id"
                 ></el-option>
-              </el-select>
+              </el-select> -->
+
+              {{ getDocumenType(document) }}
             </el-form-item>
             <el-form-item label="通知书文号:" prop="documentNumber">
-              <el-input
+              {{ document.documentNumber }}
+              <!-- <el-input
                 v-model="document.documentNumber"
                 placeholder="请选择通知书文号"
                 style="width: 74%"
               ></el-input>
-              <!-- disabled -->
               <el-button
                 type="primary"
                 size="small"
@@ -173,7 +198,7 @@
                 @click="selectClick"
               >
                 选择文号
-              </el-button>
+              </el-button> -->
             </el-form-item>
             <el-form-item label="被监审单位:" prop="enterpriseId">
               <el-select
@@ -181,7 +206,6 @@
                 placeholder="请选择被监审单位"
                 style="width: 100%"
                 clearable
-                multiple
               >
                 <el-option
                   v-for="item in allUnits"
@@ -303,6 +327,7 @@
   import {
     getWhCateList,
     queryByDocumentId,
+    getCostProjectDocumentFile,
   } from '@/api/auditReviewDocManage.js'
   import { getData } from '@/api/auditDocNoManage.js'
   import {
@@ -366,13 +391,13 @@
         selectDocumentWhSelection: [],
         costDocumentTemplateFiles: [],
         documentRules: {
-          documentNumber: [
-            {
-              required: true,
-              message: '请选择通知书文号',
-              trigger: 'change',
-            },
-          ],
+          // documentNumber: [
+          //   {
+          //     required: true,
+          //     message: '请选择通知书文号',
+          //     trigger: 'change',
+          //   },
+          // ],
           enterpriseId: [
             {
               required: true,
@@ -443,6 +468,20 @@
       this.loadOpts()
     },
     methods: {
+      // 查看监审文书
+      handleDocView(row) {
+        this.document = {
+          ...row,
+        }
+        this.fileUrl = row.electronicDocumentUrl
+        // this.handleTemplateChange()
+        this.documentDialogVisible = true
+        getCostProjectDocumentFile({
+          id: row.id,
+        }).then((res) => {
+          this.costDocumentTemplateFiles = res.value || []
+        })
+      },
       handleDocumentTypeClick(data) {
         this.activeDocumentTypeId = data.id
         this.$emit('refresh', data)

+ 31 - 11
src/components/task/taskDetail.vue

@@ -107,6 +107,7 @@
   import {
     addCostProjectScenario,
     updateCostProjectScenario,
+    getCostProjectDocumentPageList,
   } from '@/api/taskCustomizedRelease.js'
   import basicInfoTab from './taskComponents/basicInfoTab.vue'
   import workPlanTab from './taskComponents/workPlanTab.vue'
@@ -117,7 +118,7 @@
   import discussionTab from './taskComponents/discussionTab.vue'
   import conclusionTab from './taskComponents/conclusionTab.vue'
   import { taskMixin } from '@/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/index.js'
-  import { getWhCateList } from '@/api/auditReviewDocManage.js'
+  import { getWhCateList, getDocList } from '@/api/auditReviewDocManage.js'
   export default {
     name: 'TaskDetail',
     components: {
@@ -215,16 +216,14 @@
         if (this.activeTab === 'auditNotice') {
           this.$nextTick(async () => {
             try {
-              if (
-                !this.documentData.documentTypes ||
-                this.documentData.documentTypes.length === 0
-              ) {
-                const res = await getWhCateList()
-                this.documentData.documentTypes = (res && res.value) || []
-              }
-              if (typeof this.getDocumentData === 'function') {
-                this.getDocumentData()
-              }
+              // if (
+              //   !this.documentData.documentTypes ||
+              //   this.documentData.documentTypes.length === 0
+              // ) {
+              //   const res = await getWhCateList()
+              //   this.documentData.documentTypes = (res && res.value) || []
+              // }
+              this.getDocumentData()
             } catch (e) {
               // no-op
             }
@@ -274,6 +273,27 @@
           })
         }
       },
+      // 获取监审通知数据
+      async getDocumentData(data) {
+        const res = await getDocList({
+          page: 1,
+          pageSize: 50,
+        })
+        this.documentData.documentTypes = res.value.records || []
+        const pid = this.actualProject && this.actualProject.projectId
+        ;('')
+        if (!pid) return
+        getCostProjectDocumentPageList({
+          pageNum: this.documentData.pagination.currentPage,
+          pageSize: this.documentData.pagination.pageSize,
+          projectId: pid,
+          documentName: data ? data.documentName : '',
+        }).then((res) => {
+          this.documentData.list = res.value.value.records
+          this.documentData.pagination.total = res.value.value.total
+        })
+      },
+
       // 供 materialTab 调用或父级主动触发加载
       getMaterialData() {
         this.$nextTick(() => {

+ 5 - 4
src/components/task/taskInfo.vue

@@ -386,9 +386,9 @@
                   >
                     上传附件
                   </el-button> -->
-                  <span>
+                  <!-- <span>
                     {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-                  </span>
+                  </span> -->
                   <el-button
                     v-if="scope.row.feedbackDocumentUrl"
                     type="text"
@@ -840,7 +840,7 @@
       :visible="documentDialogVisible"
       width="82%"
       :close-on-click-modal="false"
-      :z-index="8000"
+      :z-index="9200"
       @cancel="handleDocCancel"
     >
       <div class="document-edit-container">
@@ -1924,7 +1924,8 @@
         this.document = {
           ...row,
         }
-        this.handleTemplateChange()
+        // this.handleTemplateChange()
+        this.fileUrl = row.electronicDocumentUrl
         this.documentDialogVisible = true
         getCostProjectDocumentFile({
           id: row.id,

+ 4 - 3
src/views/EntDeclaration/auditTaskManagement/components/AuditDocumentTab.vue

@@ -57,9 +57,9 @@
           v-if="scope.row.documentName.includes('送达回证')"
           slot-scope="scope"
         >
-          <span>
+          <!-- <span>
             {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-          </span>
+          </span> -->
           <el-button
             type="text"
             size="mini"
@@ -315,7 +315,8 @@
         this.document = {
           ...row,
         }
-        this.handleTemplateChange()
+        this.fileUrl = row.electronicDocumentUrl
+        // this.handleTemplateChange()
         this.documentDialogVisible = true
         getCostProjectDocumentFile({
           id: row.id,

+ 12 - 8
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -53,7 +53,7 @@
           </template>
           <template #scanDocumentUrl="scope">
             <el-button
-              v-if="!isView"
+              v-if="!isView && getDocumenType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleUploadScan(scope.row, 'scanDocumentUrl')"
@@ -78,9 +78,9 @@
               上传附件
             </el-button> -->
             <div v-if="getDocumenType(scope.row).includes('送达回证')">
-              <span>
+              <!-- <span>
                 {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-              </span>
+              </span> -->
               <el-button
                 v-if="scope.row.feedbackDocumentUrl"
                 type="text"
@@ -127,9 +127,9 @@
         </CostAuditTable>
       </div>
     </div>
-    <div style="margin-top: 20px; font-size: 14px" class="table-description">
+    <!-- <div style="margin-top: 20px; font-size: 14px" class="table-description">
       说明:此处只能生成各被监审单位的《成本监审通知书》和《送达回证》,同时接收或上传被监审单位的反馈的《送达回证》。
-    </div>
+    </div> -->
 
     <!-- 编辑监审通知书 -->
     <CostAuditDialog
@@ -137,7 +137,7 @@
       :visible="documentDialogVisible"
       width="82%"
       :close-on-click-modal="false"
-      :z-index="9100"
+      :z-index="9200"
       @cancel="handleCancel"
       @confirm="handleConfirm"
     >
@@ -613,8 +613,12 @@
       this.loadOpts()
     },
     methods: {
+      handleDocumentTypeClick(data) {
+        this.activeDocumentTypeId = data.id
+        this.getData(data)
+      },
       // 获取监审通知数据
-      async getData() {
+      async getData(data) {
         const res = await getDocList({
           page: 1,
           pageSize: 50,
@@ -629,7 +633,7 @@
           pageNum: this.documentData.pagination.currentPage,
           pageSize: this.documentData.pagination.pageSize,
           projectId: this.project.projectId,
-          documentName: '',
+          documentName: data ? data.documentName : '',
           permissionType: '0',
         }).then((res) => {
           this.documentData.list = res.value.value.records

+ 8 - 3
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -78,9 +78,9 @@
               上传附件
             </el-button> -->
             <div v-if="getDocumenType(scope.row).includes('送达回证')">
-              <span>
+              <!-- <span>
                 {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
-              </span>
+              </span> -->
               <el-button
                 v-if="scope.row.feedbackDocumentUrl"
                 type="text"
@@ -530,13 +530,18 @@
         deep: true,
       },
     },
-    mounted() {},
+    mounted() {
+      this.loadOpts()
+    },
     methods: {
       handleDocumentTypeClick(data) {
         this.activeDocumentTypeId = data.id
         this.$emit('refresh', data)
       },
       getEnterpriseName(row) {
+        let unit = this.allUnits.find(
+          (item) => item.unitId === row.enterpriseId
+        )
         // 处理enterpriseId,无论是数组还是逗号分隔的字符串
         let enterpriseIds = []
         if (Array.isArray(row.enterpriseId)) {