Pārlūkot izejas kodu

Merge branch 'master' of http://1.71.9.215:3000/feiyi/cbjsxt-front-master

shiyanyu 18 stundas atpakaļ
vecāks
revīzija
d3e08bb2ce

+ 95 - 0
src/components/costAudit/UploadComponent.vue

@@ -108,6 +108,11 @@
             <i class="iconfont-5039297 icon-shanchu1"></i>
           </el-tooltip>
         </span>
+        <span @click="downloadFile(file)">
+          <el-tooltip effect="dark" content="下载文件" placement="top">
+            <i class="iconfont-5039297 icon-xiazai1"></i>
+          </el-tooltip>
+        </span>
       </div>
     </div>
 
@@ -449,6 +454,92 @@
         // onlinePreview?type=pdf - 强制使用PDF模式预览
         window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
       },
+      // 规范化URL(相对路径拼接上后端基础地址)
+      normalizeUrl(rawUrl) {
+        if (!rawUrl) return ''
+        return rawUrl.startsWith('http') ? rawUrl : window.context.form + rawUrl
+      },
+
+      // 从 Content-Disposition 中提取文件名
+      extractFileName(contentDisposition) {
+        if (!contentDisposition) return ''
+        try {
+          // attachment; filename="xxx.pdf"; filename*=UTF-8''xxx.pdf
+          const fileNameMatch = contentDisposition.match(
+            /filename\*?=(?:UTF-8''|")?([^\";]+)/i
+          )
+          if (fileNameMatch && fileNameMatch[1]) {
+            return decodeURIComponent(fileNameMatch[1].replace(/\"/g, ''))
+          }
+        } catch (e) {
+          console.warn('解析文件名失败:', e)
+        }
+        return ''
+      },
+
+      async downloadFile(file) {
+        const rawUrl = file && file.filePath
+        const fallbackName = file && file.fileName
+        if (!rawUrl) {
+          this.$message &&
+            this.$message.warning &&
+            this.$message.warning('无法获取文件地址')
+          return
+        }
+
+        const url = this.normalizeUrl(rawUrl)
+        let loading
+
+        try {
+          loading = this.$baseLoading
+            ? this.$baseLoading(1, '文件下载中...')
+            : this.$loading({
+                lock: true,
+                text: '文件下载中...',
+                spinner: 'el-icon-loading',
+                background: 'rgba(0,0,0,0.7)',
+              })
+
+          const res = await fetch(url, { method: 'GET' })
+          if (!res.ok) throw new Error('下载失败')
+
+          const blob = await res.blob()
+
+          let fileName =
+            this.extractFileName(res.headers.get('content-disposition')) ||
+            fallbackName ||
+            '下载文件'
+
+          // 如果文件名没有扩展名,则尝试从URL中补充
+          if (!/\.[a-zA-Z0-9]+$/.test(fileName)) {
+            const extFromUrl = (
+              url.split('?')[0].split('#')[0].split('.').pop() || ''
+            ).toLowerCase()
+            fileName = extFromUrl ? `${fileName}.${extFromUrl}` : fileName
+          }
+
+          const objectUrl = window.URL.createObjectURL(blob)
+          const link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = objectUrl
+          link.download = fileName
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link)
+          window.URL.revokeObjectURL(objectUrl)
+
+          this.$message &&
+            this.$message.success &&
+            this.$message.success('开始下载文件')
+        } catch (e) {
+          console.error('文件下载失败:', e)
+          this.$message &&
+            this.$message.error &&
+            this.$message.error(e.message || '文件下载失败')
+        } finally {
+          if (loading && loading.close) loading.close()
+        }
+      },
     },
   }
 </script>
@@ -564,4 +655,8 @@
     margin-top: 20px;
     text-align: right;
   }
+  .icon-xiazai1 {
+    color: $base-color-default;
+    margin-left: 10px;
+  }
 </style>

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

@@ -884,10 +884,10 @@
           if (item.originalText.includes('需要提供材料') && item.dataValue) {
             this.dataUploadUrl = item.dataValue
           }
-          if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-          }
+          // if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          // }
           if (
             item.pinyin.includes('ShiJian') &&
             (item.dataValue == null || item.dataValue == '')
@@ -904,10 +904,10 @@
               ? item.dataValue
               : moment(item.dataValue).format('YYYY年MM月DD日')
           }
-          if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-          }
+          // if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          // }
           if (documenName.includes('成本监审通知书')) {
             if (item.pinyin.includes('DanWeiMingCheng')) {
               item.dataValue = unit.unitName

+ 16 - 17
src/components/task/taskDetail.vue

@@ -65,6 +65,22 @@
             :survey-data="surveyData"
           />
         </el-tab-pane>
+        <!-- 监审工作流程 -->
+        <el-tab-pane label="监审工作流程" name="workflow">
+          <workflowTab
+            ref="workflowTab"
+            :project="actualProject"
+            :is-view="isView"
+            :workflow-data.sync="workflowData"
+          />
+        </el-tab-pane>
+        <el-tab-pane label="消息通知" name="messageNotify">
+          <messageNotifyTab
+            :id="actualProject.id"
+            ref="messageNotifyTab"
+            :selected-project="actualProject"
+          />
+        </el-tab-pane>
         <!-- 监审文书 -->
         <el-tab-pane label="监审文书" name="auditNotice">
           <auditNoticeTab
@@ -90,23 +106,6 @@
             :is-view="isView"
           />
         </el-tab-pane>
-
-        <!-- 监审工作流程 -->
-        <el-tab-pane label="监审工作流程" name="workflow">
-          <workflowTab
-            ref="workflowTab"
-            :project="actualProject"
-            :is-view="isView"
-            :workflow-data.sync="workflowData"
-          />
-        </el-tab-pane>
-        <el-tab-pane label="消息通知" name="messageNotify">
-          <messageNotifyTab
-            :id="actualProject.id"
-            ref="messageNotifyTab"
-            :selected-project="actualProject"
-          />
-        </el-tab-pane>
       </el-tabs>
     </div>
   </el-dialog>

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

@@ -904,10 +904,10 @@
           if (item.originalText.includes('需要提供材料') && item.dataValue) {
             this.dataUploadUrl = item.dataValue
           }
-          if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-          }
+          // if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          // }
           if (
             item.pinyin.includes('ShiJian') &&
             (item.dataValue == null || item.dataValue == '')
@@ -924,10 +924,10 @@
               ? item.dataValue
               : moment(item.dataValue).format('YYYY年MM月DD日')
           }
-          if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-          }
+          // if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          // }
           if (documenName.includes('成本监审通知书')) {
             if (primaryUnit) {
               if (item.pinyin.includes('DanWeiMingCheng')) {

+ 262 - 139
src/views/costAudit/baseInfo/costFormManage/infoMaintain.vue

@@ -456,7 +456,11 @@
                 </template>
               </el-table-column>
 
-              <el-table-column prop="showVisible" label="是否显示" width="120">
+              <el-table-column
+                prop="showVisible"
+                label="是否在项目中显示"
+                width="140"
+              >
                 <template slot-scope="scope">
                   <el-select
                     v-model="scope.row.showVisible"
@@ -709,7 +713,11 @@
                 </template>
               </el-table-column>
 
-              <el-table-column prop="showVisible" label="是否显示" width="120">
+              <el-table-column
+                prop="showVisible"
+                label="是否在项目中显示"
+                width="140"
+              >
                 <template slot-scope="scope">
                   <el-select
                     v-model="scope.row.showVisible"
@@ -874,7 +882,7 @@
                     <el-tag v-else type="info" size="small">无</el-tag>
                   </template>
                 </el-table-column>
-                <el-table-column label="序号" width="120" align="center">
+                <!-- <el-table-column label="序号" width="120" align="center">
                   <template slot-scope="scope">
                     <el-input
                       :value="
@@ -889,7 +897,7 @@
                       @input="handleFixedValueChange(scope.row, '序号', $event)"
                     ></el-input>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
                 <el-table-column
                   v-for="(item, index) in contentEditForm.fixedTable
                     .fixedTableHeaders"
@@ -1182,7 +1190,11 @@
                 </template>
               </el-table-column>
 
-              <el-table-column prop="showVisible" label="是否显示" width="120">
+              <el-table-column
+                prop="showVisible"
+                label="是否在项目中显示"
+                width="140"
+              >
                 <template slot-scope="scope">
                   <el-select
                     v-model="scope.row.showVisible"
@@ -1330,7 +1342,7 @@
                     <el-tag v-else type="info" size="small">无</el-tag>
                   </template>
                 </el-table-column>
-                <el-table-column label="序号" width="120" align="center">
+                <!-- <el-table-column label="序号" width="120" align="center">
                   <template slot-scope="scope">
                     <div
                       style="
@@ -1355,7 +1367,7 @@
                       ></el-input>
                     </div>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
 
                 <el-table-column
                   v-for="(item, index) in contentEditForm.dynamicTable
@@ -2570,11 +2582,11 @@
             }
 
             for (const key in fixedValues) {
-              if (key == '序号') {
-                fixedValues[key] = childOrderNum
-              } else {
-                fixedValues[key] = ''
-              }
+              // if (key == '序号') {
+              //   fixedValues[key] = childOrderNum
+              // } else {
+              fixedValues[key] = ''
+              // }
             }
 
             const fixedNewRow = {
@@ -2635,11 +2647,11 @@
                 .children.length + 1
             let dynamicValues = { ...parentRow.dynamicValues }
             for (const key in dynamicValues) {
-              if (key == '序号') {
-                dynamicValues[key] = dynamicChildOrderNum
-              } else {
-                dynamicValues[key] = ''
-              }
+              // if (key == '序号') {
+              //   dynamicValues[key] = dynamicChildOrderNum
+              // } else {
+              dynamicValues[key] = ''
+              // }
             }
 
             const dynamicNewRow = {
@@ -2702,54 +2714,75 @@
               })) || []
 
             // 检查并添加序号字段(固定表和动态表需要)
-            if (['2', '3'].includes(this.contentEditForm.templateType)) {
-              const hasSerialNumber = this.contentEditForm.tableHeaders.some(
-                (item) => item.fieldName === '序号'
-              )
-              if (!hasSerialNumber) {
-                this.contentEditForm.tableHeaders.unshift({
-                  fieldName: '序号',
-                  fieldType: 'string',
-                  format: '255',
-                  fieldTypelen: '',
-                  fieldTypenointlen: '',
-                  isRequired: 'false',
-                  showVisible: '1',
-                  isAuditPeriod: 'false',
-                  tabtype: this.templateType,
-                  surveyTemplateId: this.surveyTemplateId,
-                  versionId: this.versionId,
-                  isDisabled: false,
-                  orderNum: 1,
-                })
-              } else {
-                // 如果已存在序号字段,确保其不可编辑
-                const serialNumberIndex =
-                  this.contentEditForm.tableHeaders.findIndex(
-                    (item) => item.fieldName === '序号'
-                  )
-                if (serialNumberIndex !== -1) {
-                  this.contentEditForm.tableHeaders[
-                    serialNumberIndex
-                  ].isDisabled = false
-                }
+            // if (['2', '3'].includes(this.contentEditForm.templateType)) {
+            //   const hasSerialNumber = this.contentEditForm.tableHeaders.some(
+            //     (item) => item.fieldName === '序号'
+            //   )
+            //   if (!hasSerialNumber) {
+            //     this.contentEditForm.tableHeaders.unshift({
+            //       fieldName: '序号',
+            //       fieldType: 'string',
+            //       format: '255',
+            //       fieldTypelen: '',
+            //       fieldTypenointlen: '',
+            //       isRequired: 'false',
+            //       showVisible: '1',
+            //       isAuditPeriod: 'false',
+            //       tabtype: this.templateType,
+            //       surveyTemplateId: this.surveyTemplateId,
+            //       versionId: this.versionId,
+            //       isDisabled: false,
+            //       orderNum: 1,
+            //     })
+            //   } else {
+            //     // 如果已存在序号字段,确保其不可编辑
+            //     const serialNumberIndex =
+            //       this.contentEditForm.tableHeaders.findIndex(
+            //         (item) => item.fieldName === '序号'
+            //       )
+            //     if (serialNumberIndex !== -1) {
+            //       this.contentEditForm.tableHeaders[
+            //         serialNumberIndex
+            //       ].isDisabled = false
+            //     }
+            //   }
+            // }
+
+            // 使用深拷贝避免引用问题,并根据模板类型更新对应的表头
+            const sortedHeaders = [...this.contentEditForm.tableHeaders].sort(
+              (a, b) => (a.orderNum || 0) - (b.orderNum || 0)
+            )
+
+            // 根据模板类型更新对应的表头,避免重复赋值
+            if (this.contentEditForm.templateType === '2') {
+              // 固定表:只在表头为空或需要更新时才赋值
+              if (
+                !this.contentEditForm.fixedTable.tableHeaders ||
+                this.contentEditForm.fixedTable.tableHeaders.length === 0
+              ) {
+                this.contentEditForm.fixedTable.tableHeaders =
+                  sortedHeaders.map((item) => ({ ...item }))
               }
+            } else if (this.contentEditForm.templateType === '3') {
+              // 动态表:只在表头为空或需要更新时才赋值
+              if (
+                !this.contentEditForm.dynamicTable.tableHeaders ||
+                this.contentEditForm.dynamicTable.tableHeaders.length === 0
+              ) {
+                this.contentEditForm.dynamicTable.tableHeaders =
+                  sortedHeaders.map((item) => ({ ...item }))
+              }
+            } else {
+              // 单记录类型:直接赋值
+              this.contentEditForm.dynamicTable.tableHeaders =
+                sortedHeaders.map((item) => ({ ...item }))
+              this.contentEditForm.fixedTable.tableHeaders = sortedHeaders.map(
+                (item) => ({ ...item })
+              )
             }
 
-            this.contentEditForm.dynamicTable.tableHeaders =
-              this.contentEditForm.tableHeaders
-            this.contentEditForm.fixedTable.tableHeaders =
-              this.contentEditForm.tableHeaders
-            // 表头按照orderNum重新排序
-            this.contentEditForm.tableHeaders.sort(
-              (a, b) => a.orderNum - b.orderNum
-            )
-            this.contentEditForm.dynamicTable.tableHeaders.sort(
-              (a, b) => a.orderNum - b.orderNum
-            )
-            this.contentEditForm.fixedTable.tableHeaders.sort(
-              (a, b) => a.orderNum - b.orderNum
-            )
+            // 更新主表头数据
+            this.contentEditForm.tableHeaders = sortedHeaders
             // 同时获取表头标题信息
             listByTemplateIdAndVersion(surveyTemplateId, versionId)
               .then((response) => {
@@ -3066,9 +3099,10 @@
             this.contentEditForm.fixedTable.fixedTablesTitle =
               this.stringToObjects(fixedFields || '')
             this.contentEditForm.fixedTable.fixedTableHeaders =
-              this.contentEditForm.fixedTable.fixedTablesTitle.filter(
-                (title) => title.rkey !== '序号'
-              )
+              this.contentEditForm.fixedTable.fixedTablesTitle
+            // this.contentEditForm.fixedTable.fixedTablesTitle.filter(
+            //   (title) => title.rkey !== '序号'
+            // )
             handleDelete()
             // 重新排序
             this.updateTableHeadersOrderNumbers()
@@ -3184,9 +3218,10 @@
             this.contentEditForm.dynamicTable.dynamicTablesTitle =
               this.stringToObjects(dynamicFields || '')
             this.contentEditForm.dynamicTable.dynamicTableHeaders =
-              this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
-                (title) => title.rkey !== '序号'
-              )
+              this.contentEditForm.dynamicTable.dynamicTablesTitle
+            // this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
+            //   (title) => title.rkey !== '序号'
+            // )
             handleDelete()
             // 重新排序
             this.updateTableHeadersOrderNumbers()
@@ -3441,27 +3476,28 @@
         curr.orderNum = swam.orderNum
         swam.orderNum = tempOrderNum
         // row.isChild &&
-        if (!isHeader) {
-          // 获取当前项的序号值
-          let currIndex = curr.fixedValues
-            ? curr.fixedValues['序号']
-            : curr.dynamicValues['序号']
-          // 获取交换项的序号值
-          let swamIndex = swam.fixedValues
-            ? swam.fixedValues['序号']
-            : swam.dynamicValues['序号']
-          // 先保存交换项的值,再进行赋值,避免值被覆盖
-          if (curr.fixedValues) {
-            curr.fixedValues['序号'] = swamIndex
-          } else {
-            curr.dynamicValues['序号'] = swamIndex
-          }
-          if (swam.fixedValues) {
-            swam.fixedValues['序号'] = currIndex
-          } else {
-            swam.dynamicValues['序号'] = currIndex
-          }
-        }
+        //  获取当前项的序号值
+        // if (!isHeader) {
+        //   // 获取当前项的序号值
+        //   let currIndex = curr.fixedValues
+        //     ? curr.fixedValues['序号']
+        //     : curr.dynamicValues['序号']
+        //   // 获取交换项的序号值
+        //   let swamIndex = swam.fixedValues
+        //     ? swam.fixedValues['序号']
+        //     : swam.dynamicValues['序号']
+        //   // 先保存交换项的值,再进行赋值,避免值被覆盖
+        //   if (curr.fixedValues) {
+        //     curr.fixedValues['序号'] = swamIndex
+        //   } else {
+        //     curr.dynamicValues['序号'] = swamIndex
+        //   }
+        //   if (swam.fixedValues) {
+        //     swam.fixedValues['序号'] = currIndex
+        //   } else {
+        //     swam.dynamicValues['序号'] = currIndex
+        //   }
+        // }
 
         // 交换数组中的位置
         arr[rowIndex] = swam
@@ -3596,8 +3632,17 @@
                 this.loading = false
               })
           } else if (type === '固定表表头') {
+            // 确保使用最新的表头数据,避免使用旧数据
+            const headersToSave =
+              this.contentEditForm.fixedTable.tableHeaders.map((item) => ({
+                ...item,
+              }))
+            console.log(
+              '保存固定表表头,发送的数据:',
+              JSON.stringify(headersToSave, null, 2)
+            )
             var data = {
-              headersList: this.contentEditForm.fixedTable.tableHeaders,
+              headersList: headersToSave,
             }
             getBatchSaveOrUpdate(data)
               .then((res) => {
@@ -3607,17 +3652,49 @@
 
                   // 如果后端返回了保存后的数据,更新本地数据
                   if (res.value && Array.isArray(res.value)) {
-                    this.contentEditForm.fixedTable.tableHeaders =
-                      res.value.map((item) => ({
-                        ...item,
-                      }))
+                    console.log(
+                      '保存成功,后端返回的数据:',
+                      JSON.stringify(res.value, null, 2)
+                    )
+                    // 直接使用后端返回的数据,确保数据一致性,完全替换旧数据
+                    const newHeaders = res.value.map((item) => ({
+                      ...item,
+                      fieldKey: item.fieldEname
+                        ? item.fieldEname.toLowerCase()
+                        : `field_${Date.now()}_${Math.random()
+                            .toString(36)
+                            .substr(2, 9)}`,
+                    }))
+                    // 使用 Vue.set 或直接赋值确保响应式更新
+                    this.$set(
+                      this.contentEditForm.fixedTable,
+                      'tableHeaders',
+                      newHeaders
+                    )
                     // 确保保存后的数据也按正确顺序显示
                     this.updateTableHeadersOrderNumbers()
+                    // 同步更新主表头数据,使用深拷贝避免引用问题
+                    this.$set(
+                      this.contentEditForm,
+                      'tableHeaders',
+                      this.contentEditForm.fixedTable.tableHeaders.map(
+                        (item) => ({ ...item })
+                      )
+                    )
+                    console.log(
+                      '更新后的表头数据:',
+                      JSON.stringify(
+                        this.contentEditForm.fixedTable.tableHeaders,
+                        null,
+                        2
+                      )
+                    )
+                  } else {
+                    // 如果后端没有返回数据,说明可能有问题,但保持当前数据不变
+                    console.warn('保存成功但后端未返回表头数据,保持当前数据')
                   }
-                  this.getListBySurveyTemplateIdAndVersion(
-                    this.surveyTemplateId,
-                    this.versionId
-                  )
+                  // 不再调用 getListBySurveyTemplateIdAndVersion,避免重复获取表头数据
+                  // 只获取项目数据
                   listByTemplateIdAndVersion(
                     this.surveyTemplateId,
                     this.versionId
@@ -3634,9 +3711,10 @@
                         }
                       )
                       this.contentEditForm.fixedTable.fixedTableHeaders =
-                        this.contentEditForm.fixedTable.fixedTablesTitle.filter(
-                          (title) => title.rkey !== '序号'
-                        )
+                        this.contentEditForm.fixedTable.fixedTablesTitle
+                      // this.contentEditForm.fixedTable.fixedTablesTitle.filter(
+                      //   (title) => title.rkey !== '序号'
+                      // )
                     })
                     .catch((error) => {
                       console.error('查询失败:', error)
@@ -3656,8 +3734,17 @@
           } else if (type === '固定表项目') {
             this.saveFixedTableData(action)
           } else if (type === '动态表表头') {
+            // 确保使用最新的表头数据,避免使用旧数据
+            const headersToSave =
+              this.contentEditForm.dynamicTable.tableHeaders.map((item) => ({
+                ...item,
+              }))
+            console.log(
+              '保存动态表表头,发送的数据:',
+              JSON.stringify(headersToSave, null, 2)
+            )
             var data = {
-              headersList: this.contentEditForm.dynamicTable.tableHeaders,
+              headersList: headersToSave,
             }
             getBatchSaveOrUpdate(data)
               .then((res) => {
@@ -3667,23 +3754,49 @@
 
                   // 如果后端返回了保存后的数据,更新本地数据
                   if (res.value && Array.isArray(res.value)) {
-                    this.contentEditForm.dynamicTable.tableHeaders =
-                      res.value.map((item) => ({
-                        ...item,
-                        fieldKey: item.fieldEname
-                          ? item.fieldEname.toLowerCase()
-                          : `field_${Date.now()}_${Math.random()
-                              .toString(36)
-                              .substr(2, 9)}`,
-                      }))
+                    console.log(
+                      '保存成功,后端返回的数据:',
+                      JSON.stringify(res.value, null, 2)
+                    )
+                    // 直接使用后端返回的数据,确保数据一致性,完全替换旧数据
+                    const newHeaders = res.value.map((item) => ({
+                      ...item,
+                      fieldKey: item.fieldEname
+                        ? item.fieldEname.toLowerCase()
+                        : `field_${Date.now()}_${Math.random()
+                            .toString(36)
+                            .substr(2, 9)}`,
+                    }))
+                    // 使用 Vue.set 确保响应式更新
+                    this.$set(
+                      this.contentEditForm.dynamicTable,
+                      'tableHeaders',
+                      newHeaders
+                    )
                     // 确保保存后的数据也按正确顺序显示
                     this.updateTableHeadersOrderNumbers()
+                    // 同步更新主表头数据,使用深拷贝避免引用问题
+                    this.$set(
+                      this.contentEditForm,
+                      'tableHeaders',
+                      this.contentEditForm.dynamicTable.tableHeaders.map(
+                        (item) => ({ ...item })
+                      )
+                    )
+                    console.log(
+                      '更新后的表头数据:',
+                      JSON.stringify(
+                        this.contentEditForm.dynamicTable.tableHeaders,
+                        null,
+                        2
+                      )
+                    )
+                  } else {
+                    // 如果后端没有返回数据,说明可能有问题,但保持当前数据不变
+                    console.warn('保存成功但后端未返回表头数据,保持当前数据')
                   }
-                  this.getListBySurveyTemplateIdAndVersion(
-                    this.surveyTemplateId,
-                    this.versionId
-                  )
-
+                  // 不再调用 getListBySurveyTemplateIdAndVersion,避免重复获取表头数据
+                  // 只获取项目数据
                   listByTemplateIdAndVersion(
                     this.surveyTemplateId,
                     this.versionId
@@ -3701,9 +3814,10 @@
                         }
                       )
                       this.contentEditForm.dynamicTable.dynamicTableHeaders =
-                        this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
-                          (title) => title.rkey !== '序号'
-                        )
+                        this.contentEditForm.dynamicTable.dynamicTablesTitle
+                      // this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
+                      //   (title) => title.rkey !== '序号'
+                      // )
                     })
                     .catch((error) => {
                       console.error('查询失败:', error)
@@ -4249,9 +4363,10 @@
             this.stringToObjects(fixedFields || '')
         }
         const fixedTitles = this.contentEditForm.fixedTable.fixedTablesTitle
-        this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles.filter(
-          (title) => title.rkey !== '序号'
-        )
+        this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles
+        // this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles.filter(
+        //   (title) => title.rkey !== '序号'
+        // )
         if (
           !responseData ||
           !responseData.value ||
@@ -4327,11 +4442,15 @@
         })
 
         // 对子项进行排序
+        // parentItems.forEach((parent) => {
+        //   parent.children.sort(
+        //     (a, b) =>
+        //       (a.fixedValues['序号'] || 0) - (b.fixedValues['序号'] || 0)
+        //   )
+        //   treeData.push(parent)
+        // })
+        // 不需要对子项进行排序,直接将父项推入treeData
         parentItems.forEach((parent) => {
-          parent.children.sort(
-            (a, b) =>
-              (a.fixedValues['序号'] || 0) - (b.fixedValues['序号'] || 0)
-          )
           treeData.push(parent)
         })
 
@@ -4355,8 +4474,8 @@
         }
         const dynamicTitles =
           this.contentEditForm.dynamicTable.dynamicTablesTitle
-        this.contentEditForm.dynamicTable.dynamicTableHeaders =
-          dynamicTitles.filter((title) => title.rkey !== '序号')
+        this.contentEditForm.dynamicTable.dynamicTableHeaders = dynamicTitles
+        // dynamicTitles.filter((title) => title.rkey !== '序号')
         if (
           !responseData ||
           !responseData.value ||
@@ -4402,12 +4521,12 @@
           // 初始化dynamicValues并填充实际值
           dynamicTitles.forEach((title) => {
             // 特殊处理序号字段,需要保存到dynamicValues中供输入框使用
-            if (title.rkey === '序号') {
-              // 优先使用item中的序号值,如果没有则保持为空
-              newRow.dynamicValues[title.rkey] = item[title.rkey] || ''
-            }
+            // if (title.rkey === '序号') {
+            //   // 优先使用item中的序号值,如果没有则保持为空
+            //   newRow.dynamicValues[title.rkey] = item[title.rkey] || ''
+            // }
             // 排除其他序号相关字段,避免重复显示
-            else if (title.rkey !== 'ordernum' && title.rkey !== 'orderText') {
+            if (title.rkey !== 'ordernum' && title.rkey !== 'orderText') {
               newRow.dynamicValues[title.rkey] = item[title.rkey] || ''
             }
           })
@@ -4437,17 +4556,21 @@
         })
 
         // 对子项进行排序
+        // parentItems.forEach((parent) => {
+        //   parent.children.sort(
+        //     (a, b) =>
+        //       (Number(a.dynamicValues['序号']) || 0) -
+        //       (Number(b.dynamicValues['序号']) || 0)
+        //   )
+        //   treeData.push(parent)
+        // })
+        // 不需要对子项进行排序,直接将父项推入treeData
         parentItems.forEach((parent) => {
-          parent.children.sort(
-            (a, b) =>
-              (Number(a.dynamicValues['序号']) || 0) -
-              (Number(b.dynamicValues['序号']) || 0)
-          )
           treeData.push(parent)
         })
 
         this.contentEditForm.dynamicTable.dynamicTables = treeData
-        console.log('树形结构数据:', treeData)
+        // console.log('树形结构数据:', treeData)
       },
       //分割字符串
       stringToObjects(str) {

+ 68 - 66
src/views/costAudit/baseInfo/costVerifyManage/index.vue

@@ -575,8 +575,8 @@
 
               <el-table-column
                 prop="showVisible"
-                label="是否显示"
-                width="120"
+                label="是否在项目中显示"
+                width="140"
                 align="center"
               >
                 <template slot-scope="scope">
@@ -771,7 +771,7 @@
                     <el-tag v-else type="info" size="small">无</el-tag>
                   </template>
                 </el-table-column>
-                <el-table-column label="序号" width="80" align="center">
+                <!-- <el-table-column label="序号" width="80" align="center">
                   <template slot-scope="scope">
                     <div
                       class="row-indent-container"
@@ -792,7 +792,7 @@
                       ></el-input>
                     </div>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
 
                 <el-table-column
                   v-for="(item, index) in contentEditForm.fixedTable
@@ -1589,30 +1589,30 @@
             )
 
           // 如果没有序号数据,则添加一条默认的序号数据,并标记为不可编辑
-          if (!hasSerialNumber) {
-            this.contentEditForm.fixedTable.tableHeaders.unshift({
-              fieldName: '序号',
-              fieldType: 'string',
-              format: '30',
-              fieldTypelen: '',
-              fieldTypenointlen: '',
-              isRequired: 'false',
-              showVisible: '1',
-              isAuditPeriod: 'false',
-              tabtype: '2',
-              surveyTemplateId: this.contentEditForm.surveyTemplateId,
-              versionId: this.versionId,
-              isFixed: '1',
-              isReadOnly: true, // 标记为不可编辑
-              orderNum: 1,
-            })
-          } else {
-            this.contentEditForm.fixedTable.tableHeaders.forEach((item) => {
-              if (item.fieldName === '序号') {
-                item.isReadOnly = true // 确保序号字段不可编辑
-              }
-            })
-          }
+          // if (!hasSerialNumber) {
+          //   this.contentEditForm.fixedTable.tableHeaders.unshift({
+          //     fieldName: '序号',
+          //     fieldType: 'string',
+          //     format: '30',
+          //     fieldTypelen: '',
+          //     fieldTypenointlen: '',
+          //     isRequired: 'false',
+          //     showVisible: '1',
+          //     isAuditPeriod: 'false',
+          //     tabtype: '2',
+          //     surveyTemplateId: this.contentEditForm.surveyTemplateId,
+          //     versionId: this.versionId,
+          //     isFixed: '1',
+          //     isReadOnly: true, // 标记为不可编辑
+          //     orderNum: 1,
+          //   })
+          // } else {
+          //   this.contentEditForm.fixedTable.tableHeaders.forEach((item) => {
+          //     if (item.fieldName === '序号') {
+          //       item.isReadOnly = true // 确保序号字段不可编辑
+          //     }
+          //   })
+          // }
         }
         // 处理表格数据
         if (tableDataRes.code == 200) {
@@ -1749,8 +1749,8 @@
             this.contentEditForm.fixedTable.tableHeaders.some(
               (item) => item.fieldName === row.fieldName
             )
-          // 跳过"序号"列
-          if (row.fieldName !== '序号' && !existsInTableHeaders) {
+          // 不需要跳过"序号"列 row.fieldName !== '序号' &&
+          if (!existsInTableHeaders) {
             // 更新tableHeaders数组,这是关键的数据源
             this.contentEditForm.fixedTable.tableHeaders.push({
               fieldName: row.fieldName,
@@ -1896,9 +1896,10 @@
             this.contentEditForm.fixedTable.fixedTablesTitle =
               this.stringToObjects(fixedFields || '')
             this.contentEditForm.fixedTable.fixedTableHeaders =
-              this.contentEditForm.fixedTable.fixedTablesTitle.filter(
-                (title) => title.rkey !== '序号'
-              )
+              this.contentEditForm.fixedTable.fixedTablesTitle
+            // this.contentEditForm.fixedTable.fixedTablesTitle.filter(
+            //   (title) => title.rkey !== '序号'
+            // )
             handleDelete()
             // 重新排序
             this.updateTableHeadersOrderNumbers()
@@ -2103,27 +2104,27 @@
         curr.orderNum = swam.orderNum
         swam.orderNum = tempOrderNum
         // row.isChild &&
-        if (!isHeader) {
-          // 获取当前项的序号值
-          let currIndex = curr.fixedValues
-            ? curr.fixedValues['序号']
-            : curr.dynamicValues['序号']
-          // 获取交换项的序号值
-          let swamIndex = swam.fixedValues
-            ? swam.fixedValues['序号']
-            : swam.dynamicValues['序号']
-          // 先保存交换项的值,再进行赋值,避免值被覆盖
-          if (curr.fixedValues) {
-            curr.fixedValues['序号'] = swamIndex
-          } else {
-            curr.dynamicValues['序号'] = swamIndex
-          }
-          if (swam.fixedValues) {
-            swam.fixedValues['序号'] = currIndex
-          } else {
-            swam.dynamicValues['序号'] = currIndex
-          }
-        }
+        // if (!isHeader) {
+        //   // 获取当前项的序号值
+        //   let currIndex = curr.fixedValues
+        //     ? curr.fixedValues['序号']
+        //     : curr.dynamicValues['序号']
+        //   // 获取交换项的序号值
+        //   let swamIndex = swam.fixedValues
+        //     ? swam.fixedValues['序号']
+        //     : swam.dynamicValues['序号']
+        //   // 先保存交换项的值,再进行赋值,避免值被覆盖
+        //   if (curr.fixedValues) {
+        //     curr.fixedValues['序号'] = swamIndex
+        //   } else {
+        //     curr.dynamicValues['序号'] = swamIndex
+        //   }
+        //   if (swam.fixedValues) {
+        //     swam.fixedValues['序号'] = currIndex
+        //   } else {
+        //     swam.dynamicValues['序号'] = currIndex
+        //   }
+        // }
 
         // 交换数组中的位置
         arr[rowIndex] = swam
@@ -2176,11 +2177,11 @@
             }
 
             for (const key in fixedValues) {
-              if (key == '序号') {
-                fixedValues[key] = childOrderNum
-              } else {
-                fixedValues[key] = ''
-              }
+              // if (key == '序号') {
+              //   fixedValues[key] = childOrderNum
+              // } else {
+              fixedValues[key] = ''
+              // }
             }
 
             const fixedNewRow = {
@@ -2530,9 +2531,10 @@
           fixedFields || ''
         )
         const fixedTitles = this.contentEditForm.fixedTable.fixedTablesTitle
-        this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles.filter(
-          (title) => title.rkey !== '序号'
-        )
+        this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles
+        // this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles.filter(
+        //   (title) => title.rkey !== '序号'
+        // )
         if (
           !responseData ||
           !responseData.value ||
@@ -2608,10 +2610,10 @@
 
         // 对子项进行排序
         parentItems.forEach((parent) => {
-          parent.children.sort(
-            (a, b) =>
-              (a.fixedValues['序号'] || 0) - (b.fixedValues['序号'] || 0)
-          )
+          // parent.children.sort(
+          //   (a, b) =>
+          //     (a.fixedValues['序号'] || 0) - (b.fixedValues['序号'] || 0)
+          // )
           treeData.push(parent)
         })
 

+ 123 - 105
src/views/costAudit/baseInfo/financeSheetManage/infoMaintain.vue

@@ -420,7 +420,11 @@
                 </template>
               </el-table-column>
 
-              <el-table-column prop="showVisible" label="是否显示" width="120">
+              <el-table-column
+                prop="showVisible"
+                label="是否在项目中显示"
+                width="140"
+              >
                 <template slot-scope="scope">
                   <el-select
                     v-model="scope.row.showVisible"
@@ -673,7 +677,11 @@
                 </template>
               </el-table-column>
 
-              <el-table-column prop="showVisible" label="是否显示" width="120">
+              <el-table-column
+                prop="showVisible"
+                label="是否在项目中显示"
+                width="140"
+              >
                 <template slot-scope="scope">
                   <el-select
                     v-model="scope.row.showVisible"
@@ -838,7 +846,7 @@
                     <el-tag v-else type="info" size="small">无</el-tag>
                   </template>
                 </el-table-column>
-                <el-table-column label="序号" width="100" align="center">
+                <!-- <el-table-column label="序号" width="100" align="center">
                   <template slot-scope="scope">
                     <el-input
                       :value="
@@ -852,7 +860,7 @@
                       @input="handleFixedValueChange(scope.row, '序号', $event)"
                     ></el-input>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
 
                 <el-table-column
                   v-for="(item, index) in contentEditForm.fixedTable
@@ -1147,7 +1155,11 @@
                 </template>
               </el-table-column>
 
-              <el-table-column prop="showVisible" label="是否显示" width="120">
+              <el-table-column
+                prop="showVisible"
+                label="是否在项目中显示"
+                width="140"
+              >
                 <template slot-scope="scope">
                   <el-select
                     v-model="scope.row.showVisible"
@@ -1295,7 +1307,7 @@
                     <el-tag v-else type="info" size="small">无</el-tag>
                   </template>
                 </el-table-column>
-                <el-table-column label="序号" width="100" align="center">
+                <!-- <el-table-column label="序号" width="100" align="center">
                   <template slot-scope="scope">
                     <el-input
                       :value="
@@ -1311,7 +1323,7 @@
                       "
                     ></el-input>
                   </template>
-                </el-table-column>
+                </el-table-column> -->
 
                 <el-table-column
                   v-for="(item, index) in contentEditForm.dynamicTable
@@ -2415,11 +2427,11 @@
             }
 
             for (const key in fixedValues) {
-              if (key == '序号') {
-                fixedValues[key] = childOrderNum
-              } else {
-                fixedValues[key] = ''
-              }
+              // if (key == '序号') {
+              //   fixedValues[key] = childOrderNum
+              // } else {
+              fixedValues[key] = ''
+              // }
             }
 
             const fixedNewRow = {
@@ -2477,11 +2489,11 @@
                 .children.length + 1
             let dynamicValues = { ...parentRow.dynamicValues }
             for (const key in dynamicValues) {
-              if (key == '序号') {
-                dynamicValues[key] = dynamicChildOrderNum
-              } else {
-                dynamicValues[key] = ''
-              }
+              // if (key == '序号') {
+              //   dynamicValues[key] = dynamicChildOrderNum
+              // } else {
+              dynamicValues[key] = ''
+              // }
             }
 
             const dynamicNewRow = {
@@ -2543,39 +2555,39 @@
                       .substr(2, 9)}`,
               })) || []
             // 检查并添加序号字段(固定表和动态表需要)
-            if (['2', '3'].includes(this.contentEditForm.templateType)) {
-              const hasSerialNumber = this.contentEditForm.tableHeaders.some(
-                (item) => item.fieldName === '序号'
-              )
-              if (!hasSerialNumber) {
-                this.contentEditForm.tableHeaders.unshift({
-                  fieldName: '序号',
-                  fieldType: 'string',
-                  format: '255',
-                  fieldTypelen: '',
-                  fieldTypenointlen: '',
-                  isRequired: 'false',
-                  showVisible: '1',
-                  isAuditPeriod: 'false',
-                  tabtype: this.templateType,
-                  surveyTemplateId: this.surveyTemplateId,
-                  versionId: this.versionId,
-                  isDisabled: true,
-                  orderNum: 1,
-                })
-              } else {
-                // 如果已存在序号字段,确保其不可编辑
-                const serialNumberIndex =
-                  this.contentEditForm.tableHeaders.findIndex(
-                    (item) => item.fieldName === '序号'
-                  )
-                if (serialNumberIndex !== -1) {
-                  this.contentEditForm.tableHeaders[
-                    serialNumberIndex
-                  ].isDisabled = true
-                }
-              }
-            }
+            // if (['2', '3'].includes(this.contentEditForm.templateType)) {
+            //   const hasSerialNumber = this.contentEditForm.tableHeaders.some(
+            //     (item) => item.fieldName === '序号'
+            //   )
+            //   if (!hasSerialNumber) {
+            //     this.contentEditForm.tableHeaders.unshift({
+            //       fieldName: '序号',
+            //       fieldType: 'string',
+            //       format: '255',
+            //       fieldTypelen: '',
+            //       fieldTypenointlen: '',
+            //       isRequired: 'false',
+            //       showVisible: '1',
+            //       isAuditPeriod: 'false',
+            //       tabtype: this.templateType,
+            //       surveyTemplateId: this.surveyTemplateId,
+            //       versionId: this.versionId,
+            //       isDisabled: true,
+            //       orderNum: 1,
+            //     })
+            //   } else {
+            //     // 如果已存在序号字段,确保其不可编辑
+            //     const serialNumberIndex =
+            //       this.contentEditForm.tableHeaders.findIndex(
+            //         (item) => item.fieldName === '序号'
+            //       )
+            //     if (serialNumberIndex !== -1) {
+            //       this.contentEditForm.tableHeaders[
+            //         serialNumberIndex
+            //       ].isDisabled = true
+            //     }
+            //   }
+            // }
             this.contentEditForm.dynamicTable.tableHeaders =
               this.contentEditForm.tableHeaders
             this.contentEditForm.fixedTable.tableHeaders =
@@ -2637,9 +2649,10 @@
           }
         )
         this.contentEditForm.fixedTable.fixedTableHeaders =
-          this.contentEditForm.fixedTable.fixedTablesTitle.filter(
-            (title) => title.rkey !== '序号'
-          )
+          this.contentEditForm.fixedTable.fixedTablesTitle
+        // this.contentEditForm.fixedTable.fixedTablesTitle.filter(
+        //   (title) => title.rkey !== '序号'
+        // )
 
         return row
       },
@@ -2906,9 +2919,10 @@
             this.contentEditForm.fixedTable.fixedTablesTitle =
               this.stringToObjects(fixedFields || '')
             this.contentEditForm.fixedTable.fixedTableHeaders =
-              this.contentEditForm.fixedTable.fixedTablesTitle.filter(
-                (title) => title.rkey !== '序号'
-              )
+              this.contentEditForm.fixedTable.fixedTablesTitle
+            // this.contentEditForm.fixedTable.fixedTablesTitle.filter(
+            //   (title) => title.rkey !== '序号'
+            // )
             handleDelete()
             // 重新排序
             this.updateTableHeadersOrderNumbers()
@@ -3022,9 +3036,10 @@
             this.contentEditForm.dynamicTable.dynamicTablesTitle =
               this.stringToObjects(dynamicFields || '')
             this.contentEditForm.dynamicTable.dynamicTableHeaders =
-              this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
-                (title) => title.rkey !== '序号'
-              )
+              this.contentEditForm.dynamicTable.dynamicTablesTitle
+            // this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
+            //   (title) => title.rkey !== '序号'
+            // )
             handleDelete()
             // 重新排序
             this.updateTableHeadersOrderNumbers()
@@ -3247,27 +3262,27 @@
         swam.orderNum = tempOrderNum
 
         // 刷新序号 row.isChild&&
-        if (!isHeader) {
-          // 获取当前项的序号值
-          let currIndex = curr.fixedValues
-            ? curr.fixedValues['序号']
-            : curr.dynamicValues['序号']
-          // 获取交换项的序号值
-          let swamIndex = swam.fixedValues
-            ? swam.fixedValues['序号']
-            : swam.dynamicValues['序号']
-          // 先保存交换项的值,再进行赋值,避免值被覆盖
-          if (curr.fixedValues) {
-            curr.fixedValues['序号'] = swamIndex
-          } else {
-            curr.dynamicValues['序号'] = swamIndex
-          }
-          if (swam.fixedValues) {
-            swam.fixedValues['序号'] = currIndex
-          } else {
-            swam.dynamicValues['序号'] = currIndex
-          }
-        }
+        // if (!isHeader) {
+        //   // 获取当前项的序号值
+        //   let currIndex = curr.fixedValues
+        //     ? curr.fixedValues['序号']
+        //     : curr.dynamicValues['序号']
+        //   // 获取交换项的序号值
+        //   let swamIndex = swam.fixedValues
+        //     ? swam.fixedValues['序号']
+        //     : swam.dynamicValues['序号']
+        //   // 先保存交换项的值,再进行赋值,避免值被覆盖
+        //   if (curr.fixedValues) {
+        //     curr.fixedValues['序号'] = swamIndex
+        //   } else {
+        //     curr.dynamicValues['序号'] = swamIndex
+        //   }
+        //   if (swam.fixedValues) {
+        //     swam.fixedValues['序号'] = currIndex
+        //   } else {
+        //     swam.dynamicValues['序号'] = currIndex
+        //   }
+        // }
 
         // 交换数组中的位置
         arr[rowIndex] = swam
@@ -3401,9 +3416,10 @@
                         }
                       )
                       this.contentEditForm.fixedTable.fixedTableHeaders =
-                        this.contentEditForm.fixedTable.fixedTablesTitle.filter(
-                          (title) => title.rkey !== '序号'
-                        )
+                        this.contentEditForm.fixedTable.fixedTablesTitle
+                      // this.contentEditForm.fixedTable.fixedTablesTitle.filter(
+                      //   (title) => title.rkey !== '序号'
+                      // )
                     })
                     .catch((error) => {
                       console.error('查询失败:', error)
@@ -3466,9 +3482,10 @@
                         }
                       )
                       this.contentEditForm.dynamicTable.dynamicTableHeaders =
-                        this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
-                          (title) => title.rkey !== '序号'
-                        )
+                        this.contentEditForm.dynamicTable.dynamicTablesTitle
+                      // this.contentEditForm.dynamicTable.dynamicTablesTitle.filter(
+                      //   (title) => title.rkey !== '序号'
+                      // )
                     })
                     .catch((error) => {
                       console.error('查询失败:', error)
@@ -3873,9 +3890,10 @@
             this.stringToObjects(fixedFields || '')
         }
         const fixedTitles = this.contentEditForm.fixedTable.fixedTablesTitle
-        this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles.filter(
-          (title) => title.rkey !== '序号'
-        )
+        this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles
+        // this.contentEditForm.fixedTable.fixedTableHeaders = fixedTitles.filter(
+        //   (title) => title.rkey !== '序号'
+        // )
         if (
           !responseData ||
           !responseData.value ||
@@ -3951,10 +3969,10 @@
 
         // 对子项进行排序
         parentItems.forEach((parent) => {
-          parent.children.sort(
-            (a, b) =>
-              (a.fixedValues['序号'] || 0) - (b.fixedValues['序号'] || 0)
-          )
+          // parent.children.sort(
+          //   (a, b) =>
+          //     (a.fixedValues['序号'] || 0) - (b.fixedValues['序号'] || 0)
+          // )
           treeData.push(parent)
         })
 
@@ -3978,8 +3996,8 @@
         }
         const dynamicTitles =
           this.contentEditForm.dynamicTable.dynamicTablesTitle
-        this.contentEditForm.dynamicTable.dynamicTableHeaders =
-          dynamicTitles.filter((title) => title.rkey !== '序号')
+        this.contentEditForm.dynamicTable.dynamicTableHeaders = dynamicTitles
+        // dynamicTitles.filter((title) => title.rkey !== '序号')
         if (
           !responseData ||
           !responseData.value ||
@@ -4023,12 +4041,12 @@
           // 初始化dynamicValues并填充实际值
           dynamicTitles.forEach((title) => {
             // 特殊处理序号字段,需要保存到dynamicValues中供输入框使用
-            if (title.rkey === '序号') {
-              // 优先使用item中的序号值,如果没有则保持为空
-              newRow.dynamicValues[title.rkey] = item[title.rkey] || ''
-            }
+            // if (title.rkey === '序号') {
+            //   // 优先使用item中的序号值,如果没有则保持为空
+            //   newRow.dynamicValues[title.rkey] = item[title.rkey] || ''
+            // }
             // 排除其他序号相关字段,避免重复显示
-            else if (title.rkey !== 'ordernum' && title.rkey !== 'orderText') {
+            if (title.rkey !== 'ordernum' && title.rkey !== 'orderText') {
               newRow.dynamicValues[title.rkey] = item[title.rkey] || ''
             }
           })
@@ -4059,11 +4077,11 @@
 
         // 对子项进行排序
         parentItems.forEach((parent) => {
-          parent.children.sort(
-            (a, b) =>
-              (Number(a.dynamicValues['序号']) || 0) -
-              (Number(b.dynamicValues['序号']) || 0)
-          )
+          // parent.children.sort(
+          //   (a, b) =>
+          //     (Number(a.dynamicValues['序号']) || 0) -
+          //     (Number(b.dynamicValues['序号']) || 0)
+          // )
           treeData.push(parent)
         })
 

+ 8 - 8
src/views/costAudit/baseInfo/statistics/components/auditNoticeTab.vue

@@ -884,10 +884,10 @@
           if (item.originalText.includes('需要提供材料') && item.dataValue) {
             this.dataUploadUrl = item.dataValue
           }
-          if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-          }
+          // if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          // }
           if (
             item.pinyin.includes('ShiJian') &&
             (item.dataValue == null || item.dataValue == '')
@@ -904,10 +904,10 @@
               ? item.dataValue
               : moment(item.dataValue).format('YYYY年MM月DD日')
           }
-          if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-          }
+          // if (item.pinyin.includes('DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          // }
           if (documenName.includes('成本监审通知书')) {
             if (item.pinyin.includes('DanWeiMingCheng')) {
               item.dataValue = unit.unitName

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

@@ -791,11 +791,11 @@
           ) {
             this.dataUploadUrl = item.dataValue
           }
-          if (this.strIncludes(item.pinyin, 'DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-            // item.dataValue = item.dataValue
-          }
+          // if (this.strIncludes(item.pinyin, 'DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          //   // item.dataValue = item.dataValue
+          // }
           if (
             this.strIncludes(item.pinyin, 'ShiJian') &&
             (item.dataValue == null || item.dataValue == '')
@@ -815,11 +815,11 @@
               ? item.dataValue
               : moment(item.dataValue).format('YYYY年MM月DD日')
           }
-          if (this.strIncludes(item.pinyin, 'DiGaoNeiRong') && item.dataValue) {
-            // 移除所有HTML标签
-            // item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-            item.dataValue = item.dataValue
-          }
+          // if (this.strIncludes(item.pinyin, 'DiGaoNeiRong') && item.dataValue) {
+          //   // 移除所有HTML标签
+          //   // item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+          //   item.dataValue = item.dataValue
+          // }
           if (this.strIncludes(documenName, '成本监审通知书')) {
             if (primaryUnit) {
               if (this.strIncludes(item.pinyin, 'DanWeiMingCheng')) {

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

@@ -200,7 +200,7 @@
       :close-on-click-modal="false"
     >
       <div class="dialog-content">
-        <el-form ref="urgeForm" :model="urgeForm" label-width="120px">
+        <el-form ref="urgeForm" :model="urgeForm" label-width="140px">
           <el-form-item label="选择督办人员:">
             <el-select
               v-model="urgeForm.remindPerson"
@@ -215,11 +215,11 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择督办时间:">
+          <el-form-item label="选择要求办结时间:">
             <el-date-picker
               v-model="urgeForm.requireTime"
               type="date"
-              placeholder="请选择督办日期"
+              placeholder="请选择要求办结时间"
               style="width: 100%"
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"