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

fix:修改任务制定-监审通知-数据项的查询条件

luzhixia 1 месяц назад
Родитель
Сommit
27325cbceb

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

@@ -705,15 +705,44 @@
         this.document.documentName = data.documentName
         this.document.documentNumber = ''
         this.document.documentWhId = ''
-        this.getDocumentData()
       },
       getDocumentData() {
         if (this.document.id === null || this.document.id === '') {
           queryByDocumentIdandWhereValue({
             documentId: this.document.documentId,
             whereValue: this.project.projectId,
+            unitId: this.document.enterpriseId,
           }).then((res) => {
             this.costDocumentTemplateFiles = res.value || []
+            let unit = this.allUnits.find(
+              (item) => item.unitId === this.document.enterpriseId
+            )
+            this.costDocumentTemplateFiles.forEach((item) => {
+              if (item.pinyin.includes('BeiJianShenDanWei')) {
+                item.dataValue = unit.unitName
+              }
+              if (item.pinyin.includes('ShouSongDaRen')) {
+                item.dataValue = unit.contactName
+              }
+              if (item.pinyin.includes('BeiJianShenDanWeiBanGongDiDian')) {
+                item.dataValue = unit.address
+              }
+              if (item.pinyin.includes('BeiJianShenDanWeiLianXiRenDianHua')) {
+                item.dataValue = unit.contactMobile
+              }
+              // 回显文号
+              // 获取选中的文号信息
+              const selectedDocument = this.selectDocumentWhSelection[0]
+              if (
+                item.pinyin.includes('WenHao') ||
+                item.pinyin.includes('WenJianHao')
+              ) {
+                item.dataValue = selectedDocument.whNo
+              }
+              if (item.pinyin.includes('SongDaWenShuMingCheng')) {
+                item.dataValue = selectedDocument.whName
+              }
+            })
           })
         } else {
           getCostProjectDocumentFile({
@@ -722,6 +751,9 @@
             id: this.document.id,
           }).then((res) => {
             this.costDocumentTemplateFiles = res.value || []
+            let unit = this.allUnits.find(
+              (item) => item.unitId === this.document.enterpriseId
+            )
           })
         }
       },
@@ -782,6 +814,7 @@
               item.dataValue = unit.contactMobile
             }
           })
+          this.getDocumentData()
         }
       },
       // 保存文档