Переглянути джерело

fix:任务制定-监审文书数据项必填校验,创建日期只显示年月日,修改弹窗宽度,监审项目集体审议修改新增接口地址,修改接口地址,新增参数

luzhixia 3 тижнів тому
батько
коміт
3900688218

+ 4 - 2
src/api/audit/collective.js

@@ -13,9 +13,10 @@ export function getCollectiveDeliberateList(data) {
 
 // 集体审议 - 新增
 // POST /api/costProjectDeliberate/v1/
+// /api/costProjectDeliberate/v1/save
 export function addCollectiveDeliberate(data) {
   return request({
-    url: url + '/api/costProjectDeliberate/v1/',
+    url: url + '/api/costProjectDeliberate/v1/save',
     method: 'post',
     data: data,
   })
@@ -23,9 +24,10 @@ export function addCollectiveDeliberate(data) {
 
 // 集体审议 - 更新
 // PUT /api/costProjectDeliberate/v1/
+// /api/costProjectDeliberate/v1/update
 export function updateCollectiveDeliberate(data) {
   return request({
-    url: url + '/api/costProjectDeliberate/v1/',
+    url: url + '/api/costProjectDeliberate/v1/update ',
     method: 'put',
     data: data,
   })

+ 1 - 0
src/components/costAudit/CostAuditDialog.vue

@@ -14,6 +14,7 @@
     :show-close="showClose"
     :before-close="handleBeforeClose"
     v-bind="mergedDialogProps"
+    :style="{ minWidth: '650px' }"
     @open="handleOpen"
     @close="handleClose"
     @closed="handleClosed"

+ 3 - 3
src/components/costAudit/FilePreview.vue

@@ -28,9 +28,9 @@
           // 对文件URL进行Base64编码
           const encodedUrl = encodeURIComponent(Base64.encode(fileUrl))
 
-          // 构建 kkFileView 预览URL
-          // onlinePreview - 在线预览
-          // onlinePreview?type=pdf - 强制使用PDF模式预览
+          // 构建 kkFileView 预览URL,添加参数隐藏工具栏
+          // officePreviewType=doc:使用文档预览模式
+          // hideTopbar=true:隐藏顶部工具栏
           return `${host}:8012/onlinePreview?url=${encodedUrl}`
         } catch (error) {
           return ''

+ 1 - 1
src/components/costAudit/SelectCatalogDialog.vue

@@ -46,7 +46,7 @@
       // 弹窗宽度
       dialogWidth: {
         type: String,
-        default: '30%',
+        default: '650px',
       },
       formItem: {
         type: Object,

+ 26 - 10
src/components/task/mounTaskComponents/auditNoticeTab.vue

@@ -236,12 +236,20 @@
                   show-overflow-tooltip
                 >
                   <template slot-scope="scope">
-                    <el-input
-                      v-if="scope.row.originalText !== '需要提供材料'"
-                      v-model="scope.row.dataValue"
-                      size="small"
-                      placeholder="请输入数据值"
-                    ></el-input>
+                    <div v-if="scope.row.originalText !== '需要提供材料'">
+                      <el-input
+                        v-if="scope.row.originalText.includes('时间')"
+                        v-model="scope.row.dataValue.split(' ')[0]"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                      <el-input
+                        v-else
+                        v-model="scope.row.dataValue"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                    </div>
                     <div v-else>
                       <el-button
                         type="text"
@@ -651,10 +659,7 @@
                 const year = date.getFullYear()
                 const month = String(date.getMonth() + 1).padStart(2, '0')
                 const day = String(date.getDate()).padStart(2, '0')
-                const hours = String(date.getHours()).padStart(2, '0')
-                const minutes = String(date.getMinutes()).padStart(2, '0')
-                const seconds = String(date.getSeconds()).padStart(2, '0')
-                item.dataValue = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+                item.dataValue = `${year}-${month}-${day}`
               }
               if (
                 item.originalText.includes('需要提供材料') &&
@@ -924,6 +929,17 @@
             this.$message.error('请填写必填项!')
             return false
           }
+          // 判断this.costDocumentTemplateFiles里面的值是否为空,一次性提示所有为空的值需要填写
+          let emptyFields = []
+          this.costDocumentTemplateFiles.forEach((item) => {
+            if (!item.dataValue && item.originalText !== '需要提供材料') {
+              emptyFields.push(item.originalText)
+            }
+          })
+          if (emptyFields.length > 0) {
+            this.$message.error(emptyFields.join('、') + '不能为空!')
+            return false
+          }
           this.loading.saveDocument = true
           if (this.document.id) {
             updateCostProjectDocument({

+ 25 - 7
src/components/task/taskComponents/auditNoticeTab.vue

@@ -280,13 +280,20 @@
                   show-overflow-tooltip
                 >
                   <template slot-scope="scope">
-                    <el-input
-                      v-if="scope.row.originalText !== '需要提供材料'"
-                      v-model="scope.row.dataValue"
-                      size="small"
-                      placeholder="请输入数据值"
-                      disabled
-                    ></el-input>
+                    <div v-if="scope.row.originalText !== '需要提供材料'">
+                      <el-input
+                        v-if="scope.row.originalText.includes('时间')"
+                        v-model="scope.row.dataValue.split(' ')[0]"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                      <el-input
+                        v-else
+                        v-model="scope.row.dataValue"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                    </div>
                     <!-- 否则显示上传按钮 -->
                     <div v-else>
                       <!-- <el-button
@@ -666,6 +673,17 @@
           this.$message.error('请至少选择一个被监审单位!')
           return
         }
+        // 判断this.costDocumentTemplateFiles里面的值是否为空,一次性提示所有为空的值需要填写
+        let emptyFields = []
+        this.costDocumentTemplateFiles.forEach((item) => {
+          if (!item.dataValue && item.originalText !== '需要提供材料') {
+            emptyFields.push(item.originalText)
+          }
+        })
+        if (emptyFields.length > 0) {
+          this.$message.error(emptyFields.join('、') + '不能为空!')
+          return false
+        }
 
         this.loading.saveDocument = true
         if (this.document.id) {

+ 4 - 0
src/styles/costAudit.scss

@@ -53,3 +53,7 @@
 .info-text {
   color: #333;
 }
+.el-dropdown-menu__item{
+  color: $base-color-default;
+  border-bottom: 1px solid #eee;
+}

+ 29 - 10
src/views/costAudit/auditInfo/auditManage/auditDocumentsMain.vue

@@ -279,12 +279,20 @@
                   show-overflow-tooltip
                 >
                   <template slot-scope="scope">
-                    <el-input
-                      v-if="scope.row.originalText !== '需要提供材料'"
-                      v-model="scope.row.dataValue"
-                      size="small"
-                      placeholder="请输入数据值"
-                    ></el-input>
+                    <div v-if="scope.row.originalText !== '需要提供材料'">
+                      <el-input
+                        v-if="scope.row.originalText.includes('时间')"
+                        v-model="scope.row.dataValue.split(' ')[0]"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                      <el-input
+                        v-else
+                        v-model="scope.row.dataValue"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                    </div>
                     <!-- 否则显示上传按钮 -->
                     <div v-else>
                       <el-button
@@ -605,10 +613,10 @@
                 let year = date.getFullYear()
                 let month = String(date.getMonth() + 1).padStart(2, '0')
                 let day = String(date.getDate()).padStart(2, '0')
-                let hours = String(date.getHours()).padStart(2, '0')
-                let minutes = String(date.getMinutes()).padStart(2, '0')
-                let seconds = String(date.getSeconds()).padStart(2, '0')
-                item.dataValue = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+                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}`
               }
               if (
                 item.originalText.includes('需要提供材料') &&
@@ -930,6 +938,17 @@
             this.$message.error('请填写必填项!')
             return false
           }
+          // 判断this.costDocumentTemplateFiles里面的值是否为空,一次性提示所有为空的值需要填写
+          let emptyFields = []
+          this.costDocumentTemplateFiles.forEach((item) => {
+            if (!item.dataValue && item.originalText !== '需要提供材料') {
+              emptyFields.push(item.originalText)
+            }
+          })
+          if (emptyFields.length > 0) {
+            this.$message.error(emptyFields.join('、') + '不能为空!')
+            return false
+          }
           this.loading.saveDocument = true
           if (this.document.id) {
             updateCostProjectDocument({

+ 5 - 0
src/views/costAudit/auditInfo/auditManage/collectiveMain.vue

@@ -357,6 +357,10 @@
         type: [String, Number],
         default: null,
       },
+      project: {
+        type: Object,
+        default: () => {},
+      },
       currentNode: {
         type: String,
         default: '',
@@ -788,6 +792,7 @@
         // 构建保存数据,按照接口要求的参数格式
         const saveData = {
           id: this.formData.id,
+          projectId: this.project.projectId,
           taskId: this.id, // 使用props传入的id作为项目ID
           deliberationForm: this.formData.deliberationForm,
           beginTime: this.formData.startDate,

+ 1 - 0
src/views/costAudit/auditInfo/auditManage/mainDetails.vue

@@ -62,6 +62,7 @@
         >
           <collectiveMain
             :id="id"
+            :project="project"
             :current-node="currentNode"
             :current-status="currentStatus"
             :project-name="projectName"

+ 1 - 1
src/views/costAudit/baseInfo/auditDocManage/index.vue

@@ -140,7 +140,7 @@
     <el-dialog
       :title="dialogTitle"
       :visible.sync="dialogVisible"
-      width="600px"
+      width="650px"
       @close="handleDialogClose"
     >
       <el-form

+ 3 - 2
src/views/costAudit/baseInfo/catalogManage/index.vue

@@ -340,7 +340,8 @@
         v-loading="submitting"
         :title="title"
         :visible.sync="editDialogVisible"
-        width="600px"
+        width="650px"
+        :style="{ minWidth: '650px' }"
         append-to-body
         :close-on-click-modal="false"
       >
@@ -406,7 +407,7 @@
       <el-dialog
         :title="editContentDialogTitle"
         :visible.sync="contentDialogVisible"
-        width="600px"
+        width="650px"
         append-to-body
         :close-on-click-modal="false"
       >

+ 1 - 1
src/views/costAudit/baseInfo/catalogManage/legalDialog.vue

@@ -148,7 +148,7 @@
       // 弹窗宽度
       dialogWidth: {
         type: String,
-        default: '600px',
+        default: '650px',
       },
       // 表单数据(编辑模式使用)
       formData: {

+ 1 - 1
src/views/costAudit/baseInfo/costFormManage/index.vue

@@ -193,7 +193,7 @@
     <CostAuditDialog
       :title="dialogTitle"
       :visible.sync="dialogVisible"
-      width="500px"
+      width="650px"
       :close-on-click-modal="false"
       :show-confirm-btn="dialogTitle !== '查看成本调查表'"
       :cancel-text="dialogTitle === '查看成本调查表' ? '关 闭' : '取 消'"

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

@@ -177,7 +177,7 @@
     <el-dialog
       :title="dialogTitle"
       :visible.sync="dialogVisible"
-      width="600px"
+      width="650px"
       :close-on-click-modal="false"
     >
       <el-form

+ 1 - 1
src/views/costAudit/baseInfo/financeSheetManage/index.vue

@@ -194,7 +194,7 @@
     <CostAuditDialog
       :title="dialogTitle"
       :visible.sync="dialogVisible"
-      width="500px"
+      width="650px"
       :close-on-click-modal="false"
       :show-confirm-btn="dialogTitle !== '查看财务数据表'"
       :cancel-text="dialogTitle === '查看财务数据表' ? '关 闭' : '取 消'"

+ 11 - 1
src/views/costAudit/baseInfo/financeSheetManage/infoMaintain.vue

@@ -148,7 +148,7 @@
     </el-dialog>
 
     <!-- 添加/修改弹窗 -->
-    <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="600px">
+    <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="650px">
       <el-form
         ref="dataForm"
         :model="dataForm"
@@ -243,6 +243,7 @@
         <div v-if="contentEditForm.templateType === '1'">
           <div class="button-group">
             <el-button
+              v-if="!viewDetail"
               type="primary"
               :disabled="viewDetail"
               @click="handleAddTableHeader('单记录')"
@@ -250,6 +251,7 @@
               添加项目
             </el-button>
             <el-button
+              v-if="!viewDetail"
               type="primary"
               :disabled="viewDetail"
               @click="handleSaveContent('单记录')"
@@ -495,6 +497,7 @@
         <div v-if="contentEditForm.templateType === '2'">
           <div class="button-group">
             <el-button
+              v-if="!viewDetail"
               type="primary"
               :disabled="viewDetail"
               @click="handleAddTableHeader('固定表表头')"
@@ -502,6 +505,7 @@
               添加表头
             </el-button>
             <el-button
+              v-if="!viewDetail"
               type="primary"
               :disabled="viewDetail"
               @click="handleSaveContent('固定表表头')"
@@ -763,6 +767,7 @@
           <div>
             <div class="button-group">
               <el-button
+                v-if="!viewDetail"
                 type="primary"
                 :disabled="viewDetail"
                 @click="handleAddTableHeader('固定表项目')"
@@ -770,6 +775,7 @@
                 添加项目
               </el-button>
               <el-button
+                v-if="!viewDetail"
                 type="primary"
                 :disabled="viewDetail"
                 @click="handleSaveContent('固定表项目')"
@@ -964,6 +970,7 @@
         <div v-if="contentEditForm.templateType === '3'">
           <div class="button-group">
             <el-button
+              v-if="!viewDetail"
               type="primary"
               :disabled="viewDetail"
               @click="handleAddTableHeader('动态表表头')"
@@ -971,6 +978,7 @@
               添加表头
             </el-button>
             <el-button
+              v-if="!viewDetail"
               type="primary"
               :disabled="viewDetail"
               @click="handleSaveContent('动态表表头')"
@@ -1216,6 +1224,7 @@
           <div>
             <div class="button-group">
               <el-button
+                v-if="!viewDetail"
                 type="primary"
                 :disabled="viewDetail"
                 @click="handleAddTableHeader('动态表项目')"
@@ -1223,6 +1232,7 @@
                 添加项目
               </el-button>
               <el-button
+                v-if="!viewDetail"
                 type="primary"
                 :disabled="viewDetail"
                 @click="handleSaveContent('动态表项目')"

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

@@ -279,12 +279,20 @@
                   show-overflow-tooltip
                 >
                   <template slot-scope="scope">
-                    <el-input
-                      v-if="scope.row.originalText !== '需要提供材料'"
-                      v-model="scope.row.dataValue"
-                      size="small"
-                      placeholder="请输入数据值"
-                    ></el-input>
+                    <div v-if="scope.row.originalText !== '需要提供材料'">
+                      <el-input
+                        v-if="scope.row.originalText.includes('时间')"
+                        v-model="scope.row.dataValue.split(' ')[0]"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                      <el-input
+                        v-else
+                        v-model="scope.row.dataValue"
+                        size="small"
+                        placeholder="请输入数据值"
+                      ></el-input>
+                    </div>
                     <!-- 否则显示上传按钮 -->
                     <div v-else>
                       <el-button
@@ -439,13 +447,13 @@
         selectDocumentWhSelection: [],
         costDocumentTemplateFiles: [],
         documentRules: {
-          // documentNumber: [
-          //   {
-          //     required: true,
-          //     message: '请选择通知书文号',
-          //     trigger: 'change',
-          //   },
-          // ],
+          documentNumber: [
+            {
+              required: true,
+              message: '请选择通知书文号',
+              trigger: 'change',
+            },
+          ],
           enterpriseId: [
             {
               required: true,
@@ -528,10 +536,10 @@
                 let year = date.getFullYear()
                 let month = String(date.getMonth() + 1).padStart(2, '0')
                 let day = String(date.getDate()).padStart(2, '0')
-                let hours = String(date.getHours()).padStart(2, '0')
-                let minutes = String(date.getMinutes()).padStart(2, '0')
-                let seconds = String(date.getSeconds()).padStart(2, '0')
-                item.dataValue = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
+                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}`
               }
               if (
                 item.originalText.includes('需要提供材料') &&
@@ -663,6 +671,7 @@
         //   this.document.enterpriseId = this.project.auditedUnitId
         // }
         this.loadOpts()
+        this.fileUrl = ''
         if (this.activeDocumentTypeId) {
           this.document.documentId = this.activeDocumentTypeId
           this.handleTemplateChange()
@@ -824,6 +833,17 @@
             this.$message.error('请填写必填项!')
             return false
           }
+          // 判断this.costDocumentTemplateFiles里面的值是否为空,一次性提示所有为空的值需要填写
+          let emptyFields = []
+          this.costDocumentTemplateFiles.forEach((item) => {
+            if (!item.dataValue && item.originalText !== '需要提供材料') {
+              emptyFields.push(item.originalText)
+            }
+          })
+          if (emptyFields.length > 0) {
+            this.$message.error(emptyFields.join('、') + '不能为空!')
+            return false
+          }
           this.loading.saveDocument = true
           if (this.document.id) {
             updateCostProjectDocument({
@@ -856,12 +876,28 @@
                 : this.document.enterpriseId,
               electronicDocumentUrl: this.fileUrl,
             })
-              .then(() => {
+              .then((res) => {
                 this.loading.saveDocument = false
                 this.$message.success('保存成功!')
-                this.documentDialogVisible = false
-                this.activeView = ''
+                // this.documentDialogVisible = false
+                // this.activeView = ''
                 this.$emit('refresh', this.project.projectId)
+                if (res.value) {
+                  this.handleEditDocument({
+                    id: res.value,
+                    ...this.document,
+                    projectId: this.project.projectId,
+                    costProjectDocumentFiles:
+                      this.costDocumentTemplateFiles || [],
+                    enterpriseId: this.isMultipleMode
+                      ? this.document.enterpriseId.join(',')
+                      : this.document.enterpriseId,
+                    electronicDocumentUrl: this.fileUrl,
+                  })
+                } else {
+                  this.documentDialogVisible = false
+                  this.activeView = ''
+                }
               })
               .catch((err) => {
                 this.loading.saveDocument = false
@@ -1003,7 +1039,7 @@
         // 构建 kkFileView 预览URL
         // onlinePreview - 在线预览
         // onlinePreview?type=pdf - 强制使用PDF模式预览
-        window.open(`${host}:8012/onlinePreview?url=${encodedUrl}`)
+        window.open(`${host}:8012/onlinePreview?url=${encodedUrl}&type=pdf`)
       },
       // 编辑文档
       handleEditDocument(row) {
@@ -1022,7 +1058,17 @@
           // 确保isPushed有值,如果row中没有,设置默认值'1'
           isPushed: row.isPushed !== undefined ? row.isPushed : '1',
         }
-        this.fileUrl = this.document.electronicDocumentUrl
+        // this.fileUrl = this.document.electronicDocumentUrl
+        // 从API中获取文件URL
+        downDocument({
+          id: row.id,
+        }).then((res) => {
+          if (res.state) {
+            this.fileUrl = res.value || ''
+          } else {
+            this.$message.error('获取文件URL失败')
+          }
+        })
         this.getDocumentData()
       },
 
@@ -1164,7 +1210,6 @@
           })
       },
       handleUploadClick(row) {
-        console.log('handleUploadClick', row)
         let loading = null
         // 第一步:创建文件选择器
         const input = document.createElement('input')

+ 2 - 1
src/views/costAudit/projectInfo/taskSuperviseManage/superviseMattersManage/index.vue

@@ -169,7 +169,8 @@
     <el-dialog
       title="督办报告"
       :visible.sync="isReport"
-      width="30%"
+      width="650px"
+      :close-on-click-modal="false"
       @close="handleCancel"
     >
       <el-form label-width="120px">