Просмотр исходного кода

feat:被监审单位新增法人代表字段,监审文书-监审通知书回显法人代表字段,成本监审通知书创建日期字段,单位名称字段
fix:输入框显示输入长度限制

luzhixia 3 недель назад
Родитель
Сommit
acae461af2

+ 48 - 6
src/components/costAudit/AuditEntityFormtDialog.vue

@@ -28,6 +28,8 @@
                   v-model="formData.unitName"
                   placeholder="请输入被监审单位名称"
                   :disabled="isViewMode"
+                  maxlength="30"
+                  show-word-limit
                 />
               </el-form-item>
             </el-col>
@@ -40,6 +42,8 @@
                   v-model="formData.socialCreditCode"
                   placeholder="请输入社会信用代码"
                   :disabled="isViewMode"
+                  maxlength="18"
+                  show-word-limit
                 />
               </el-form-item>
             </el-col>
@@ -63,8 +67,12 @@
               <el-form-item label="办公地址:" prop="address">
                 <el-input
                   v-model="formData.address"
-                  placeholder="请输入办公地址"
+                  placeholder="请输入详细办公地址"
                   :disabled="isViewMode"
+                  maxlength="200"
+                  show-word-limit
+                  type="textarea"
+                  :rows="2"
                 />
               </el-form-item>
             </el-col>
@@ -122,17 +130,33 @@
               </el-form-item>
             </el-col>
           </el-row>
-          <!-- 联系人 和 联系手机 -->
+          <!-- 法人代表、联系人 -->
           <el-row :gutter="20">
             <el-col :span="12">
+              <el-form-item label="法人代表:" prop="corporateRepresentative">
+                <el-input
+                  v-model="formData.corporateRepresentative"
+                  placeholder="请输入法人代表"
+                  :disabled="isViewMode"
+                  maxlength="20"
+                  show-word-limit
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
               <el-form-item label="联系人:" prop="contactName">
                 <el-input
                   v-model="formData.contactName"
                   placeholder="请输入联系人"
                   :disabled="isViewMode"
+                  maxlength="20"
+                  show-word-limit
                 />
               </el-form-item>
             </el-col>
+          </el-row>
+          <!-- 联系手机 -->
+          <el-row :gutter="20">
             <el-col :span="12">
               <el-form-item label="联系手机:" prop="contactMobile">
                 <el-input
@@ -161,6 +185,8 @@
                   v-model="formData.postalCode"
                   placeholder="请输入邮政编码"
                   :disabled="isViewMode"
+                  maxlength="6"
+                  show-word-limit
                 />
               </el-form-item>
             </el-col>
@@ -367,6 +393,7 @@
           entityType: '', // 主体性质
           relatedUnits: [], // 关联子单位
           relatedItems: [], // 关联监审项目
+          corporateRepresentative: '', // 法人代表
           contactName: '', // 联系人
           contactMobile: '', // 联系手机
           email: '', // 电子邮箱
@@ -451,17 +478,31 @@
               trigger: 'change',
             },
           ],
+          corporateRepresentative: [
+            { required: true, message: '请输入法人代表', trigger: 'blur' },
+            {
+              min: 1,
+              max: 20,
+              message: '法人代表长度应在20个字符之间',
+              trigger: 'blur',
+            },
+            {
+              pattern: /^[\u4e00-\u9fa5]+$/,
+              message: '法人代表必须为中文姓名',
+              trigger: 'blur',
+            },
+          ],
           contactName: [
             { required: true, message: '请输入联系人', trigger: 'blur' },
             {
               min: 1,
-              max: 30,
-              message: '联系人长度应在30个字符之间',
+              max: 20,
+              message: '联系人长度应在20个字符之间',
               trigger: 'blur',
             },
             {
-              pattern: /^[\u4e00-\u9fa5a-zA-Z\s]*$/,
-              message: '联系人只能包含中英文和空格',
+              pattern: /^[\u4e00-\u9fa5]+$/,
+              message: '联系人必须为中文姓名',
               trigger: 'blur',
             },
           ],
@@ -550,6 +591,7 @@
           entityType: '',
           relatedUnits: [],
           relatedItems: [],
+          corporateRepresentative: '', // 法人代表
           contactName: '',
           contactMobile: '',
           email: '',

+ 7 - 0
src/components/costAudit/CostAuditTable.vue

@@ -11,6 +11,7 @@
         :size="size"
         :highlight-current-row="highlightCurrentRow"
         style="width: 100%"
+        :span-method="spanMethod || undefined"
         v-bind="tableProps"
         :row-class-name="processedRowClassName"
         @selection-change="handleSelectionChange"
@@ -190,6 +191,12 @@
         default: 60,
       },
 
+      // 行合并方法
+      spanMethod: {
+        type: Function,
+        default: null,
+      },
+
       // 是否显示操作列
       showActionColumn: {
         type: Boolean,

+ 47 - 30
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -38,7 +38,7 @@
           @pagination-change="handlePaginationChange"
         >
           <template #documentId="{ row }">
-            {{ row.documentName || getDocumenType(row) }}
+            {{ row.documentName || getDocumentType(row) }}
           </template>
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}
@@ -53,7 +53,7 @@
           </template>
           <template #scanDocumentUrl="scope">
             <el-button
-              v-if="!isView && getDocumenType(scope.row).includes('送达回证')"
+              v-if="!isView && getDocumentType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleUploadScan(scope.row, 'scanDocumentUrl')"
@@ -61,7 +61,7 @@
               上传附件
             </el-button>
             <el-button
-              v-if="getDocumenType(scope.row).includes('送达回证')"
+              v-if="getDocumentType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleViewScan(scope.row.scanDocumentUrl)"
@@ -78,7 +78,7 @@
             >
               上传附件
             </el-button> -->
-            <div v-if="getDocumenType(scope.row).includes('送达回证')">
+            <div v-if="getDocumentType(scope.row).includes('送达回证')">
               <!-- <span>
                 {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
               </span> -->
@@ -101,7 +101,7 @@
               查看
             </el-button>
             <el-button
-              v-if="!isView && !getDocumenType(scope.row).includes('通知书')"
+              v-if="!isView && !getDocumentType(scope.row).includes('通知书')"
               type="text"
               size="mini"
               @click="handleEditDocument(scope.row)"
@@ -184,7 +184,7 @@
               <el-input
                 v-model="document.documentNumber"
                 placeholder="请选择通知书文号"
-                style="width: 84%"
+                style="width: 82%"
                 disabled
               ></el-input>
               <!-- disabled -->
@@ -377,6 +377,7 @@
   } from '@/api/taskCustomizedRelease.js'
   import { dictMixin, regionMixin } from '@/mixins/useDict'
   import { uploadFile } from '@/api/file'
+  import moment from 'moment'
   export default {
     components: { CostAuditTable, CostAuditDialog, TemplatePreviewEdit },
     mixins: [dictMixin, regionMixin],
@@ -515,13 +516,13 @@
           ],
         },
         documentRules: {
-          // documentNumber: [
-          //   {
-          //     required: true,
-          //     message: '请选择通知书文号',
-          //     trigger: 'change',
-          //   },
-          // ],
+          documentNumber: [
+            {
+              required: true,
+              message: '请选择通知书文号',
+              trigger: 'change',
+            },
+          ],
           enterpriseId: [
             {
               required: true,
@@ -609,14 +610,9 @@
                 (item.dataValue == null || item.dataValue == '')
               ) {
                 // 获取当前时间,格式为YYYY-MM-DD HH:mm:ss
-                let date = new Date()
-                let year = date.getFullYear()
-                let month = String(date.getMonth() + 1).padStart(2, '0')
-                let day = String(date.getDate()).padStart(2, '0')
-                let hour = String(date.getHours()).padStart(2, '0')
-                let minute = String(date.getMinutes()).padStart(2, '0')
-                let second = String(date.getSeconds()).padStart(2, '0')
-                item.dataValue = `${year}-${month}-${day} ${hour}:${minute}:${second}`
+                item.dataValue = moment(new Date()).format(
+                  'YYYY-MM-DD HH:mm:ss'
+                )
               }
               if (
                 item.originalText.includes('需要提供材料') &&
@@ -698,7 +694,7 @@
         }
         return '-'
       },
-      getDocumenType(row) {
+      getDocumentType(row) {
         return this.documentData.documentTypes.find(
           (item) => item.id == row.documentId
         )?.documentName
@@ -850,7 +846,26 @@
             let unit = this.allUnits.find(
               (item) => item.unitId === this.document.enterpriseId
             )
+            let documenName = this.getDocumentType({
+              documentId: this.document.documentId,
+            })
             this.costDocumentTemplateFiles.forEach((item) => {
+              if (documenName.includes('成本监审通知书')) {
+                if (item.pinyin.includes('DanWeiMingCheng')) {
+                  item.dataValue = unit.unitName
+                }
+                if (item.pinyin.includes('FaRenDaiBiao')) {
+                  item.dataValue = unit?.corporateRepresentative || ''
+                }
+                if (
+                  item.pinyin.includes(
+                    'ChengBenJianShenTongZhiShuChuangJianRiQi'
+                  )
+                ) {
+                  // 获取当前时间
+                  item.dataValue = moment(new Date()).format('YYYY-MM-DD')
+                }
+              }
               if (item.pinyin.includes('BeiJianShenDanWei')) {
                 item.dataValue = unit.unitName
               }
@@ -866,14 +881,16 @@
               // 回显文号
               // 获取选中的文号信息
               const selectedDocument = this.selectDocumentWhSelection[0]
-              if (
-                item.pinyin.includes('WenHao') ||
-                item.pinyin.includes('WenJianHao')
-              ) {
-                item.dataValue = selectedDocument.whNo
-              }
-              if (item.pinyin.includes('SongDaWenShuMingCheng')) {
-                item.dataValue = selectedDocument.whName
+              if (selectedDocument) {
+                if (
+                  item.pinyin.includes('WenHao') ||
+                  item.pinyin.includes('WenJianHao')
+                ) {
+                  item.dataValue = selectedDocument.whNo
+                }
+                if (item.pinyin.includes('SongDaWenShuMingCheng')) {
+                  item.dataValue = selectedDocument.whName
+                }
               }
             })
           })

+ 5 - 0
src/views/costAudit/baseInfo/auditDocNoManage/index.vue

@@ -211,6 +211,8 @@
                     <el-input
                       v-model="formData.alias"
                       placeholder="请输入"
+                      maxlength="30"
+                      show-word-limit
                     ></el-input>
                   </el-form-item>
                 </el-col>
@@ -232,6 +234,7 @@
                       v-model="formData.year"
                       placeholder="请输入年号,例如:2025"
                       maxlength="4"
+                      show-word-limit
                     ></el-input>
                   </el-form-item>
                 </el-col>
@@ -246,6 +249,8 @@
                     <el-input
                       v-model="formData.currentValue"
                       placeholder="请输入当前流水号值"
+                      maxlength="30"
+                      show-word-limit
                     ></el-input>
                   </el-form-item>
                 </el-col>

+ 1 - 0
src/views/costAudit/baseInfo/catalogManage/index.vue

@@ -507,6 +507,7 @@
               :rows="3"
               maxlength="500"
               clearable
+              show-word-limit
             ></el-input>
           </el-form-item>
         </el-form>

+ 4 - 0
src/views/costAudit/baseInfo/costFormManage/infoMaintain.vue

@@ -196,6 +196,8 @@
           <el-input
             v-model="dataForm.createBy"
             placeholder="请输入创建人"
+            maxlength="30"
+            show-word-limit
           ></el-input>
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
@@ -212,6 +214,8 @@
             type="textarea"
             placeholder="请输入备注"
             rows="3"
+            maxlength="500"
+            show-word-limit
           ></el-input>
         </el-form-item>
       </el-form>

+ 2 - 0
src/views/costAudit/baseInfo/costVerifyManage/index.vue

@@ -272,6 +272,8 @@
               <el-input
                 v-model="contentEditForm.surveyTemplateName"
                 placeholder="请输入核定模板名称"
+                maxlength="30"
+                show-word-limit
               ></el-input>
             </el-form-item>
           </el-col>

+ 4 - 0
src/views/costAudit/baseInfo/costVerifyManage/infoMaintain.vue

@@ -140,6 +140,8 @@
           <el-input
             v-model="dataForm.createBy"
             placeholder="请输入创建人"
+            maxlength="30"
+            show-word-limit
           ></el-input>
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
@@ -156,6 +158,8 @@
             type="textarea"
             placeholder="请输入备注"
             rows="3"
+            maxlength="500"
+            show-word-limit
           ></el-input>
         </el-form-item>
       </el-form>

+ 4 - 0
src/views/costAudit/baseInfo/financeSheetManage/infoMaintain.vue

@@ -160,6 +160,8 @@
           <el-input
             v-model="dataForm.createBy"
             placeholder="请输入创建人"
+            maxlength="30"
+            show-word-limit
           ></el-input>
         </el-form-item>
         <el-form-item label="创建时间" prop="createTime">
@@ -176,6 +178,8 @@
             type="textarea"
             placeholder="请输入备注"
             rows="3"
+            maxlength="500"
+            show-word-limit
           ></el-input>
         </el-form-item>
       </el-form>

+ 137 - 72
src/views/costAudit/baseInfo/statistics/comprehensiveQuery.vue

@@ -34,7 +34,7 @@
         </el-form-item>
         <el-form-item label="立项年度:">
           <el-date-picker
-            v-model="searchForm.initiationYear"
+            v-model="searchForm.year"
             type="year"
             placeholder="选择立项年度"
             style="width: 150px"
@@ -58,19 +58,21 @@
     <!-- 表格区域 -->
     <div class="table-area">
       <cost-audit-table
-        :table-data="tableData"
+        :table-data="auditProjectList"
         :columns="columns"
         :pagination="pagination"
         :show-pagination="true"
         :show-index="true"
         :border="true"
         :stripe="true"
+        :span-method="handleSpanMethod"
+        :processed-row-class-name="processedRowClassName"
         @pagination-change="handlePaginationChange"
       >
         <!-- 项目名称链接 -->
-        <!-- <template #projectName="{ row }">
+        <template #projectName="{ row }">
           <a href="javascript:;" class="link-text">{{ row.projectName }}</a>
-        </template> -->
+        </template>
 
         <!-- 下载按钮组 -->
         <template #download="{ row }">
@@ -88,7 +90,7 @@
 
 <script>
   import CostAuditTable from '@/components/costAudit/CostAuditTable.vue'
-
+  import { getReviewTaskList } from '@/api/audit/auditIndex'
   export default {
     name: 'ComprehensiveQuery',
     components: {
@@ -102,77 +104,28 @@
           startYear: '',
           endYear: '',
           auditedUnit: '',
-          initiationYear: '',
+          year: '',
         },
         // 表格数据
-        tableData: [
-          {
-            id: 1,
-            initiationYear: '2025年',
-            auditRegion: '山西省',
-            projectName: '太原市电网输配电成本监审',
-            auditObject: '太原市热电厂',
-            auditPeriod: '2021-2022',
-            auditForm: '定期审审',
-            auditSubject: '山西省发改委-成本调查监审局',
-          },
-          {
-            id: 2,
-            initiationYear: '2024年',
-            auditRegion: '太原市',
-            projectName: '太原市区自来水成本监审',
-            auditObject: '通用自来水公司',
-            auditPeriod: '2021-2022',
-            auditForm: '定价调查审',
-            auditSubject: '太原市发改委-成本调查监审局',
-          },
-          {
-            id: 3,
-            initiationYear: '2024年',
-            auditRegion: '太原市',
-            projectName: '太原市区自来水成本监审',
-            auditObject: '通用自来水公司',
-            auditPeriod: '2021-2022',
-            auditForm: '定价调查审',
-            auditSubject: '太原市发改委-成本调查监审局',
-          },
-          {
-            id: 4,
-            initiationYear: '2024年',
-            auditRegion: '太原市',
-            projectName: '太原市区自来水成本监审',
-            auditObject: '通用自来水公司',
-            auditPeriod: '2021-2022',
-            auditForm: '定价调查审',
-            auditSubject: '太原市发改委-成本调查监审局',
-          },
-          {
-            id: 5,
-            initiationYear: '2024年',
-            auditRegion: '太原市',
-            projectName: '太原市区自来水成本监审',
-            auditObject: '通用自来水公司',
-            auditPeriod: '2021-2022',
-            auditForm: '定价调查审',
-            auditSubject: '太原市发改委-成本调查监审局',
-          },
-        ],
+        auditProjectList: [],
+        // 行合并映射表
+        rowSpanMap: {},
         // 表格列配置
         columns: [
           {
-            prop: 'initiationYear',
+            prop: 'year',
             label: '立项年度',
             width: 100,
           },
           {
-            prop: 'auditRegion',
+            prop: 'areaName',
             label: '监审地区',
             width: 100,
           },
           {
             prop: 'projectName',
             label: '成本监审项目名称',
-            // slotName: 'projectName',
+            slotName: 'projectName',
           },
           {
             prop: 'auditObject',
@@ -184,12 +137,12 @@
             width: 120,
           },
           {
-            prop: 'auditForm',
+            prop: 'auditType',
             label: '监审形式',
             width: 120,
           },
           {
-            prop: 'auditSubject',
+            prop: 'orgName',
             label: '监审主体',
           },
           {
@@ -206,16 +159,97 @@
         },
       }
     },
+    mounted() {
+      // 获取项目列表
+      this.handleQuery()
+    },
     methods: {
-      // 处理查询
-      handleQuery() {
-        // 这里应该调用API获取数据
-        console.log('查询条件:', this.searchForm)
-        // 模拟查询
-        this.loading = true
-        setTimeout(() => {
+      // 加载项目列表
+      async handleQuery() {
+        try {
+          this.loading = true
+          // 调用API获取数据
+          const params = {
+            pageNum: this.pagination.currentPage,
+            pageSize: this.pagination.pageSize,
+            ...this.searchForm,
+          }
+          const response = await getReviewTaskList(params)
+
+          // 根据API返回格式处理数据
+          if (response.state && response.value) {
+            // 获取记录列表
+            const records = response.value.records || []
+            console.log('原始数据:', records)
+            // 展平数据并添加行合并标记
+            this.auditProjectList = []
+            this.rowSpanMap = {} // 用于存储需要合并的行数
+
+            records.forEach((record) => {
+              // 处理父项
+              const parentRow = {
+                ...record,
+                projectName: record.projectName,
+                auditObject: record.auditedUnitName,
+                auditPeriod: record.auditPeriod,
+                status: this.getStatusText(record.status),
+                isSubTask: record.pid !== '0',
+                isParent: true,
+                hasChildren:
+                  !!record.childTasks && record.childTasks.length > 0,
+              }
+              this.auditProjectList.push(parentRow)
+
+              // 如果有子项,添加子项
+              if (record.childTasks && record.childTasks.length > 0) {
+                // 记录父项需要合并的行数
+                this.rowSpanMap[record.id] = record.childTasks.length + 1
+
+                // 处理子项
+                record.childTasks.forEach((child) => {
+                  this.auditProjectList.push({
+                    ...child,
+                    projectName: record.projectName, // 子项使用父项的项目名称
+                    auditObject:
+                      child.auditedUnitName || record.auditedUnitName,
+                    auditPeriod: child.auditPeriod || record.auditPeriod, // 优先使用子项自己的审核期间
+                    auditType: child.auditType || record.auditType, // 优先使用子项自己的监审形式
+                    status: this.getStatusText(child.status),
+                    isSubTask: true,
+                    parentId: record.id,
+                    isParent: false,
+                  })
+                })
+              }
+            })
+
+            // 设置总行数
+            this.pagination.total = this.auditProjectList.length
+            console.log('处理后的数据:', this.auditProjectList)
+            console.log('行合并映射:', this.rowSpanMap)
+          } else {
+            this.auditProjectList = []
+            this.rowSpanMap = {}
+            this.pagination.total = 0
+            this.$message.warning('未获取到项目数据')
+          }
+        } catch (error) {
+          // this.$message.error('加载审核项目列表失败')
+          console.error('加载审核项目列表失败:', error)
+          this.rowSpanMap = {}
+        } finally {
           this.loading = false
-        }, 500)
+        }
+      },
+      // 获取状态文本
+      getStatusText(status) {
+        const statusMap = {
+          ccls: '资料初审',
+          200: '审核通过',
+          clcs: '审核中', // 添加clcs状态映射为审核中
+          // 可根据实际需求补充其他状态
+        }
+        return statusMap[status] || status
       },
       // 处理重置
       handleReset() {
@@ -224,7 +258,7 @@
           startYear: '',
           endYear: '',
           auditedUnit: '',
-          initiationYear: '',
+          year: '',
         }
       },
       // 处理分页变化
@@ -248,6 +282,31 @@
         // 这里实现下载逻辑
         this.$message.success('监审卷宗功能待实现')
       },
+      // 处理表格行合并
+      handleSpanMethod({ row, column, rowIndex, columnIndex }) {
+        // 需要合并的列:立项年度、监审地区、成本监审项目名称
+        const mergeColumns = ['year', 'areaName', 'projectName']
+        const columnProp = column.property
+        // 如果是需要合并的列
+        if (mergeColumns.includes(columnProp)) {
+          if (row.isParent) {
+            // 父项合并显示
+            const spanCount = this.rowSpanMap[row.id] || 1
+            return { rowspan: spanCount, colspan: 1 }
+          } else if (row.parentId) {
+            // 子项隐藏这些列
+            return { rowspan: 0, colspan: 0 }
+          }
+        }
+        return { rowspan: 1, colspan: 1 }
+      },
+      processedRowClassName({ row, column, rowIndex, columnIndex }) {
+        // 需要合并的列:立项年度、监审地区、成本监审项目名称
+        const mergeColumns = ['year', 'areaName', 'projectName']
+        if (!mergeColumns.includes(column.property)) {
+          return row.isParent ? 'parent-row' : 'show-row'
+        }
+      },
     },
   }
 </script>
@@ -257,4 +316,10 @@
   .comprehensive-query {
     padding: 20px;
   }
+  .parent-row {
+    display: none;
+  }
+  .show-row {
+    display: block;
+  }
 </style>

+ 40 - 23
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/auditNoticeTab.vue

@@ -38,8 +38,8 @@
           @pagination-change="handlePaginationChange"
         >
           <template #documentId="{ row }">
-            <!-- getDocumenType(row) -->
-            {{ row.documentName || getDocumenType(row) }}
+            <!-- getDocumentType(row) -->
+            {{ row.documentName || getDocumentType(row) }}
           </template>
           <template #enterpriseId="{ row }">
             {{ getEnterpriseName(row) }}
@@ -54,7 +54,7 @@
           </template>
           <template #scanDocumentUrl="scope">
             <el-button
-              v-if="!isView && getDocumenType(scope.row).includes('送达回证')"
+              v-if="!isView && getDocumentType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleUploadScan(scope.row, 'scanDocumentUrl')"
@@ -62,7 +62,7 @@
               上传附件
             </el-button>
             <el-button
-              v-if="getDocumenType(scope.row).includes('送达回证')"
+              v-if="getDocumentType(scope.row).includes('送达回证')"
               type="text"
               size="mini"
               @click="handleViewScan(scope.row.scanDocumentUrl)"
@@ -79,7 +79,7 @@
             >
               上传附件
             </el-button> -->
-            <div v-if="getDocumenType(scope.row).includes('送达回证')">
+            <div v-if="getDocumentType(scope.row).includes('送达回证')">
               <!-- <span>
                 {{ scope.row.feedbackDocumentUrl ? '已回传' : '未回传' }}
               </span> -->
@@ -375,6 +375,7 @@
   } from '@/api/taskCustomizedRelease.js'
   import { dictMixin, regionMixin } from '@/mixins/useDict'
   import { uploadFile } from '@/api/file'
+  import moment from 'moment'
   export default {
     components: { CostAuditTable, CostAuditDialog, TemplatePreviewEdit },
     mixins: [dictMixin, regionMixin],
@@ -525,21 +526,15 @@
       costDocumentTemplateFiles: {
         handler(newVal, oldVal) {
           if (newVal.length > 0) {
-            console.log(this.costDocumentTemplateFiles)
             this.costDocumentTemplateFiles.forEach((item) => {
               if (
                 item.pinyin.includes('ShiJian') &&
                 (item.dataValue == null || item.dataValue == '')
               ) {
                 // 获取当前时间,格式为YYYY-MM-DD HH:mm:ss
-                let date = new Date()
-                let year = date.getFullYear()
-                let month = String(date.getMonth() + 1).padStart(2, '0')
-                let day = String(date.getDate()).padStart(2, '0')
-                let hour = String(date.getHours()).padStart(2, '0')
-                let minute = String(date.getMinutes()).padStart(2, '0')
-                let second = String(date.getSeconds()).padStart(2, '0')
-                item.dataValue = `${year}-${month}-${day} ${hour}:${minute}:${second}`
+                item.dataValue = moment(new Date()).format(
+                  'YYYY-MM-DD HH:mm:ss'
+                )
               }
               if (
                 item.originalText.includes('需要提供材料') &&
@@ -591,7 +586,7 @@
         }
         return '-'
       },
-      getDocumenType(row) {
+      getDocumentType(row) {
         return this.documentData.documentTypes.find(
           (item) => item.id == row.documentId
         )?.documentName
@@ -742,7 +737,27 @@
             let unit = this.allUnits.find(
               (item) => item.unitId === this.document.enterpriseId
             )
+            let documenName = this.getDocumentType({
+              documentId: this.document.documentId,
+            })
             this.costDocumentTemplateFiles.forEach((item) => {
+              if (documenName.includes('成本监审通知书')) {
+                if (item.pinyin.includes('DanWeiMingCheng')) {
+                  item.dataValue = unit.unitName
+                }
+                if (item.pinyin.includes('FaRenDaiBiao')) {
+                  item.dataValue = unit?.corporateRepresentative || ''
+                }
+                if (
+                  item.pinyin.includes(
+                    'ChengBenJianShenTongZhiShuChuangJianRiQi'
+                  )
+                ) {
+                  // 获取当前时间
+                  item.dataValue = moment(new Date()).format('YYYY-MM-DD')
+                }
+              }
+
               if (item.pinyin.includes('BeiJianShenDanWei')) {
                 item.dataValue = unit.unitName
               }
@@ -758,14 +773,16 @@
               // 回显文号
               // 获取选中的文号信息
               const selectedDocument = this.selectDocumentWhSelection[0]
-              if (
-                item.pinyin.includes('WenHao') ||
-                item.pinyin.includes('WenJianHao')
-              ) {
-                item.dataValue = selectedDocument.whNo
-              }
-              if (item.pinyin.includes('SongDaWenShuMingCheng')) {
-                item.dataValue = selectedDocument.whName
+              if (selectedDocument) {
+                if (
+                  item.pinyin.includes('WenHao') ||
+                  item.pinyin.includes('WenJianHao')
+                ) {
+                  item.dataValue = selectedDocument.whNo
+                }
+                if (item.pinyin.includes('SongDaWenShuMingCheng')) {
+                  item.dataValue = selectedDocument.whName
+                }
               }
             })
           })