shiyanyu преди 1 ден
родител
ревизия
9d3a74b863

+ 79 - 12
src/views/EntDeclaration/auditTaskManagement/components/SurveyFormDialog.vue

@@ -567,19 +567,30 @@
           return Number.isNaN(num) ? undefined : num
         }
         const prop =
-          getVal(
+          // 单记录保存时 rowid 需要对应后端的 fixedFieldids:优先取 pkVal/id
+          String(
+            getVal(
+              ['pkVal', 'id', 'fieldId', 'field_id', 'rowid'],
+              getVal(
+                [
+                  'fieldEname',
+                  'field_ename',
+                  'fieldName',
+                  'field_name',
+                  'columnName',
+                  'column_name',
+                  'fieldCode',
+                ],
+                `field_${index}`
+              )
+            )
+          ).trim()
+        const label =
+          // rkey 传字段名称:优先用 fieldName(中文名),否则再回退
+          (getVal(
             [
               'fieldName',
               'field_name',
-              'columnName',
-              'column_name',
-              'fieldCode',
-            ],
-            undefined
-          ) || `field_${index}`
-        const label =
-          getVal(
-            [
               'columnComment',
               'column_comment',
               'fieldCname',
@@ -588,7 +599,7 @@
               'field_label',
             ],
             prop
-          ) || prop
+          ) || prop) + ''
         const columnType =
           (getVal(
             ['columnType', 'column_type', 'fieldType', 'field_type'],
@@ -1198,8 +1209,64 @@
                 this.surveyData.id
               )
 
+              const formatDateOnly = (d) => {
+                if (!(d instanceof Date) || Number.isNaN(d.getTime())) return ''
+                const y = d.getFullYear()
+                const m = String(d.getMonth() + 1).padStart(2, '0')
+                const day = String(d.getDate()).padStart(2, '0')
+                return `${y}-${m}-${day}`
+              }
+
+              const normalizeFieldValue = (value, field) => {
+                if (value === undefined || value === null) return ''
+
+                const type = String(field?.type || '').toLowerCase()
+                const fmt = String(field?.format || '')
+                const fmtLower = fmt.toLowerCase().trim()
+
+                // 以 format 为最高优先级:
+                // - format=yyyy-MM-dd => 日期
+                // - format 包含 hh:mm:ss => 日期时间
+                const formatIsDateTime =
+                  fmtLower.includes('hh:mm:ss') || fmtLower.includes('hh')
+                const formatIsDateOnly =
+                  fmtLower.includes('yyyy-mm-dd') && !formatIsDateTime
+
+                const isDateOnly = type === 'date' || formatIsDateOnly
+                // type=datetime 但 format=yyyy-MM-dd 时,按日期处理(不要时分秒)
+                const isDateTime =
+                  formatIsDateTime || (type === 'datetime' && !formatIsDateOnly)
+
+                // 仅日期:确保只保存 yyyy-MM-dd(不带时分秒)
+                if (isDateOnly && !isDateTime) {
+                  if (value instanceof Date) return formatDateOnly(value)
+                  const s = String(value)
+                  // 兼容 '2025-12-24 10:00:00' / '2025-12-24T10:00:00'
+                  return s.length >= 10 ? s.substring(0, 10) : s
+                }
+
+                // 日期时间:保持原样(通常是 yyyy-MM-dd HH:mm:ss)
+                if (isDateTime) {
+                  if (value instanceof Date) {
+                    const y = value.getFullYear()
+                    const m = String(value.getMonth() + 1).padStart(2, '0')
+                    const day = String(value.getDate()).padStart(2, '0')
+                    const hh = String(value.getHours()).padStart(2, '0')
+                    const mm = String(value.getMinutes()).padStart(2, '0')
+                    const ss = String(value.getSeconds()).padStart(2, '0')
+                    return `${y}-${m}-${day} ${hh}:${mm}:${ss}`
+                  }
+                  return String(value)
+                }
+
+                return String(value)
+              }
+
               // 将表单数据转换为接口需要的格式
               const saveData = this.effectiveFormFields.map((field) => {
+                const rawVal = this.form[field.prop]
+                const normalizedVal = normalizeFieldValue(rawVal, field)
+
                 const dataItem = {
                   auditedUnitId:
                     this.auditedUnitId || this.surveyData.auditedUnitId || '',
@@ -1211,7 +1278,7 @@
                   taskId: this.taskId || this.surveyData.taskId || '',
                   rowid: field.prop, // 字段ID(对应 fixedFieldids)
                   rkey: field.label, // 字段名称(对应 fixedFields,即 label)
-                  rvalue: this.form[field.prop] || '', // 字段值(表单输入的值)
+                  rvalue: normalizedVal, // 字段值(表单输入的值)
                   type: this.requestType,
                 }
 

+ 4 - 7
src/views/costAudit/auditInfo/auditManage/collectiveMain.vue

@@ -24,33 +24,30 @@
           prop="deliberationForm"
           label="审议形式"
           header-align="center"
-          align="center"
+          align="left"
         />
         <el-table-column
           prop="location"
           label="地点"
           header-align="center"
-          align="center"
+          align="left"
         />
         <el-table-column
           prop="hostPerson"
           label="主持人"
           header-align="center"
-          align="center"
+          align="left"
         />
         <el-table-column
           prop="reviewTime"
           label="审议时间"
           header-align="center"
-          align="center"
-          width="180"
+          align="left"
         >
           <template slot-scope="scope">
             <span v-if="scope.row.beginTime && scope.row.endTime">
               {{ scope.row.beginTime }}
-              <br />
-              <br />
               {{ scope.row.endTime }}
             </span>
             <span v-else-if="scope.row.beginTime">

+ 2 - 2
src/views/costAudit/baseInfo/costFormManage/infoMaintain.vue

@@ -2719,7 +2719,7 @@
                   tabtype: this.templateType,
                   surveyTemplateId: this.surveyTemplateId,
                   versionId: this.versionId,
-                  isDisabled: true,
+                  isDisabled: false,
                   orderNum: 1,
                 })
               } else {
@@ -2731,7 +2731,7 @@
                 if (serialNumberIndex !== -1) {
                   this.contentEditForm.tableHeaders[
                     serialNumberIndex
-                  ].isDisabled = true
+                  ].isDisabled = false
                 }
               }
             }

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

@@ -243,7 +243,6 @@
 
             <!-- 数据内容区域 -->
             <div style="margin-top: 20px">
-              <h4 style="margin-bottom: 10px">数据内容:</h4>
               <el-table
                 :data="costDocumentTemplateFiles"
                 style="
@@ -794,8 +793,8 @@
           }
           if (this.strIncludes(item.pinyin, 'DiGaoNeiRong') && item.dataValue) {
             // 移除所有HTML标签
-            // item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
-            item.dataValue = item.dataValue
+            item.dataValue = item.dataValue.replace(/<[^>]+>/g, '')
+            // item.dataValue = item.dataValue
           }
           if (
             this.strIncludes(item.pinyin, 'ShiJian') &&

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

@@ -12,14 +12,16 @@
         <el-table-column
           prop="noticeTitle"
           label="标题"
-          align="center"
+          header-align="center"
+          align="left"
           width="200"
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column
           prop="noticeSource"
           label="消息来源"
-          align="center"
+          header-align="center"
+          align="left"
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column
@@ -36,7 +38,8 @@
           prop="noticeContent"
           label="内容"
           width="500"
-          align="center"
+          header-align="center"
+          align="left"
           show-overflow-tooltip
         ></el-table-column>
         <el-table-column