Jelajahi Sumber

fix:修补成本核定表:根据历史核定模板生成,不能点的bug
fix:成本监审任务制定:生成文书页面,表格顺序调整把电子文书插到上传扫描件前面的bug

cb_luzhixia 1 bulan lalu
induk
melakukan
26a8f24feb

+ 10 - 8
src/views/costAudit/baseInfo/costVerifyManage/index.vue

@@ -247,9 +247,9 @@
                   v-model="contentEditForm.createmode"
                   label="1"
                   :disabled="
-                    dialogTitle == '修改成本核定模板' ||
                     dialogTitle == '查看成本核定模板' ||
-                    contentEditForm.createmode != '1'
+                    dialogTitle == '修改成本核定模板' ||
+                    contentEditForm.surveyTemplateId != ''
                   "
                   @change="handleCreateModeChange"
                 >
@@ -260,9 +260,9 @@
                 v-model="contentEditForm.createtemplateid"
                 placeholder="请选择"
                 :disabled="
-                  dialogTitle == '修改成本核定模板' ||
                   dialogTitle == '查看成本核定模板' ||
-                  contentEditForm.createmode != '1'
+                  dialogTitle == '修改成本核定模板' ||
+                  contentEditForm.surveyTemplateId != ''
                 "
               >
                 <el-option
@@ -281,9 +281,9 @@
                   v-model="contentEditForm.createmode"
                   label="2"
                   :disabled="
-                    dialogTitle == '修改成本核定模板' ||
                     dialogTitle == '查看成本核定模板' ||
-                    contentEditForm.createmode != '2'
+                    dialogTitle == '修改成本核定模板' ||
+                    contentEditForm.surveyTemplateId != ''
                   "
                   @change="handleCreateModeChange"
                 >
@@ -294,9 +294,9 @@
                 v-model="contentEditForm.createtemplateid1"
                 placeholder="请选择"
                 :disabled="
-                  dialogTitle == '修改成本核定模板' ||
                   dialogTitle == '查看成本核定模板' ||
-                  contentEditForm.createmode != '2'
+                  dialogTitle == '修改成本核定模板' ||
+                  contentEditForm.surveyTemplateId != ''
                 "
               >
                 <el-option
@@ -1009,6 +1009,7 @@
   import { getCatalogDetail } from '@/api/catalogManage'
   import { listByCurrentTemplateId } from '@/api/catalogManage.js'
   import { catalogMixin, commonMixin } from '@/mixins/useDict'
+  import { getDictTypList } from '@/api/dictionaryManage.js'
   export default {
     name: 'SupervisionContent',
     // 使用混入
@@ -1403,6 +1404,7 @@
             this.$refs.contentEditForm.clearValidate()
           }
         })
+        console.log('this.contentEditForm', this.contentEditForm)
       },
 
       // 修改

+ 5 - 2
src/views/costAudit/projectInfo/auditProjectManage/memoManage/index.vue

@@ -73,7 +73,9 @@
                           class="task-item"
                         >
                           <div class="task-title">
-                            {{ index + 1 }}.{{ task.projectName }}
+                            {{ index + 1 }}.{{ task.projectName }}[{{
+                              task.timePeriod
+                            }}]
                           </div>
                         </div>
                       </template>
@@ -137,6 +139,7 @@
                     placeholder="请选择计划年度"
                     format="yyyy"
                     value-format="yyyy"
+                    clearable
                   ></el-date-picker>
                 </el-form-item>
 
@@ -169,7 +172,7 @@
                   <el-button
                     icon="el-icon-search"
                     type="primary"
-                    @click="handleSearch"
+                    @click="handleSearch()"
                   >
                     搜索
                   </el-button>

+ 52 - 5
src/views/costAudit/projectInfo/auditProjectManage/memoManage/memoManageMixin.js

@@ -165,6 +165,49 @@ export const memoManageMixin = {
     },
   },
   methods: {
+    // 优化后的获取详情方法,不再接收单个item参数
+    async getTasksByDateList() {
+      if (this.memoList.length > 0) {
+        try {
+          // 使用Promise.all并行获取所有备忘录的详情
+          const detailPromises = this.memoList.map(async (memo, index) => {
+            try {
+              const params = {
+                id: memo.id,
+              }
+              const res = await getMemoDetail(params)
+              if (res.code === 200 && res.value) {
+                // 更新原数组中的数据
+                const memoIndex = this.memoList.findIndex(
+                  (item) => item.id === memo.id
+                )
+                if (memoIndex !== -1) {
+                  this.memoList[memoIndex] = {
+                    ...this.memoList[memoIndex],
+                    ...res.value,
+                  }
+                }
+                // 返回更新后的数据
+                return {
+                  ...memo,
+                  ...res.value,
+                }
+              }
+              return memo // 如果获取失败,返回原数据
+            } catch (err) {
+              console.error('获取备忘录详情失败:', memo.id, err)
+              return memo // 发生错误时返回原数据
+            }
+          })
+
+          // 等待所有详情请求完成
+          this.memoList = await Promise.all(detailPromises)
+        } catch (error) {
+          console.error('批量获取备忘录详情失败:', error)
+          // 发生错误时返回原始列表
+        }
+      }
+    },
     // 根据提醒类型获取对应的颜色
     getReminderTypeColor(type) {
       const colorMap = {
@@ -214,8 +257,7 @@ export const memoManageMixin = {
     // 日历选择日期
     handleDateClick(date, data) {
       const dateStr = moment(date).format('YYYY-MM-DD')
-      const tasks = this.memoList.filter((task) => task.memoDate === dateStr)
-
+      // const tasks = this.memoList.filter((task) => task.memoDate === dateStr)
       this.searchParams.memoDate = dateStr
       this.handleSearch()
       // if (tasks.length > 0) {
@@ -338,19 +380,22 @@ export const memoManageMixin = {
       this.selectedDate = moment(this.selectedDate).add(1, 'month').toDate()
     },
     // 获取备忘录列表
-    async handleSearch(num) {
+    async handleSearch() {
       try {
         let params = {
           ...this.searchParams,
-          pageSize: num || this.searchParams.pageSize,
+          pageSize: this.searchParams.pageSize,
         }
         const res = await getMemoList(params)
         if (res.code == 200) {
           this.memoList = res.value.records || []
+          // 只处理day字段,不调用详情接口
           this.memoList.forEach((item) => {
             const date = new Date(item.memoDate)
             item.day = date.getDate()
           })
+          // 在列表数据设置完成后,只调用一次详情接口获取所有需要的详情
+          await this.getTasksByDateList()
           this.listTotal = res.value.total || 0
         }
       } catch (error) {
@@ -387,6 +432,8 @@ export const memoManageMixin = {
     initCalendarData(num) {
       this.selectedDate = new Date()
       this.lunarInfo = this.getLunarInfo(this.selectedDate)
+      console.log('初始化日历数据:', this.selectedDate)
+      console.log('初始化日历数据:', this.lunarInfo)
       this.handleSearch(num)
     },
     onTabChange(tab) {
@@ -570,7 +617,7 @@ export const memoManageMixin = {
     setCalendarTitle() {
       // 可以在这里添加设置日历标题的逻辑
       let lunarInfo = this.lunarInfo
-      return `${lunarInfo.lYear}年${lunarInfo.lMonth}月 农历${lunarInfo.gzYear}年【${lunarInfo.Animal}】`
+      return `${lunarInfo.cYear}年${lunarInfo.cMonth}月 农历${lunarInfo.gzYear}年【${lunarInfo.Animal}】`
     },
   },
 }

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

@@ -92,7 +92,7 @@
               查看附件
             </el-button>
           </template>
-          <template #action="scope">
+          <template #electronicDocumentUrl="scope">
             <el-button
               v-if="!isView"
               type="text"
@@ -653,7 +653,8 @@
               ...this.document,
               costProjectDocumentFiles: this.costDocumentTemplateFiles,
               projectId: this.project.projectId,
-              electronicDocumentUrl: this.fileUrl,
+              electronicDocumentUrl:
+                this.document.electronicDocumentUrl || this.fileUrl,
               enterpriseId: this.isMultipleMode
                 ? this.document.enterpriseId.join(',')
                 : this.document.enterpriseId, // 保存时转换为逗号分隔的字符串
@@ -821,7 +822,9 @@
       },
 
       // 签章
-      handleSignDocument(row) {},
+      handleSignDocument(row) {
+        this.$message.warning('签章功能待实现!')
+      },
 
       // 删除文档
       handleDeleteDocument(row) {

+ 7 - 7
src/views/costAudit/projectInfo/auditTaskManage/taskCustomizedRelease/index.js

@@ -277,6 +277,13 @@ export const taskMixin = {
             slotName: 'generateTime',
           },
           {
+            prop: 'electronicDocumentUrl',
+            label: '电子文书',
+            width: 200,
+            align: 'center',
+            slotName: 'electronicDocumentUrl',
+          },
+          {
             prop: 'scanDocumentUrl',
             label: '上传扫描件',
             width: 150,
@@ -297,13 +304,6 @@ export const taskMixin = {
             align: 'center',
             slotName: 'feedbackDocumentUrl',
           },
-          {
-            prop: 'action',
-            label: '电子文书',
-            width: 200,
-            align: 'center',
-            slotName: 'action',
-          },
         ],
       },
     }

File diff ditekan karena terlalu besar
+ 510 - 612
src/views/home/defaultIndex.vue


+ 4 - 2
src/views/home/index.vue

@@ -175,7 +175,7 @@
                 style="margin-left: 10px"
                 size="small"
                 icon="el-icon-search"
-                @click="searchMemo"
+                @click="handleSearch"
               >
                 查询
               </el-button>
@@ -252,7 +252,9 @@
                             class="task-item"
                           >
                             <div class="task-title">
-                              {{ index + 1 }}.{{ task.projectName }}
+                              {{ index + 1 }}.{{ task.projectName }}[{{
+                                task.timePeriod
+                              }}]
                             </div>
                           </div>
                         </template>

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini