Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

lizhenhao 2 gadi atpakaļ
vecāks
revīzija
192c2396a5

+ 7 - 0
src/api/cw/reportManagement/ProjectReportService.js

@@ -43,4 +43,11 @@ export default class ProjectReportService {
       params: params
       params: params
     })
     })
   }
   }
+  recordsList (params) {
+    return request({
+      url: '/cwProjectReport/recordsList',
+      method: 'get',
+      params: params
+    })
+  }
 }
 }

+ 15 - 1
src/views/modules/cw/reportManagement/ProjectInfoForm.vue

@@ -75,6 +75,7 @@
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   // import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
   // import ProgramProjectListInfoService from '@/api/program/ProgramProjectListInfoService'
   import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
   export default {
   export default {
     data () {
     data () {
       return {
       return {
@@ -106,9 +107,11 @@
     },
     },
     // programProjectListInfoService: null,
     // programProjectListInfoService: null,
     projectRecordsService: null,
     projectRecordsService: null,
+    projectReportService: null,
     created () {
     created () {
       // this.programProjectListInfoService = new ProgramProjectListInfoService()
       // this.programProjectListInfoService = new ProgramProjectListInfoService()
       this.projectRecordsService = new ProjectRecordsService()
       this.projectRecordsService = new ProjectRecordsService()
+      this.projectReportService = new ProjectReportService()
     },
     },
     components: {
     components: {
       SelectUserTree,
       SelectUserTree,
@@ -135,7 +138,7 @@
       list () {
       list () {
         this.loading = true
         this.loading = true
         // this.searchForm.createBy = this.$store.state.user.id
         // this.searchForm.createBy = this.$store.state.user.id
-        this.projectRecordsService.list({
+        this.projectReportService.recordsList({
           'current': this.tablePage.currentPage,
           'current': this.tablePage.currentPage,
           'size': this.tablePage.pageSize,
           'size': this.tablePage.pageSize,
           'orders': this.tablePage.orders,
           'orders': this.tablePage.orders,
@@ -146,6 +149,17 @@
           this.tablePage.total = data.total
           this.tablePage.total = data.total
           this.loading = false
           this.loading = false
         })
         })
+        // this.projectRecordsService.list({
+        //   'current': this.tablePage.currentPage,
+        //   'size': this.tablePage.pageSize,
+        //   'orders': this.tablePage.orders,
+        //   ...this.searchForm
+        // }).then(({data}) => {
+        //   console.log('data2', data)
+        //   this.dataList = data.records
+        //   this.tablePage.total = data.total
+        //   this.loading = false
+        // })
       },
       },
       // 当前页
       // 当前页
       currentChangeHandle ({currentPage, pageSize}) {
       currentChangeHandle ({currentPage, pageSize}) {

+ 85 - 27
src/views/modules/cw/reportManagement/ReportManagementForm.vue

@@ -13,7 +13,7 @@
         <el-row>
         <el-row>
           <el-col :span="24">
           <el-col :span="24">
 
 
-            <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="formReadOnly"
+            <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method==='view'"
                      label-width="135px" @submit.native.prevent>
                      label-width="135px" @submit.native.prevent>
               <el-row  :gutter="15">
               <el-row  :gutter="15">
                 <el-col :span="12">
                 <el-col :span="12">
@@ -252,6 +252,7 @@
       <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
       <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
       <el-button size="small" v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit('save')">确定</el-button>
       <el-button size="small" v-if="method === 'edit'" type="primary" icon="el-icon-circle-check" @click="doSubmit('save')">确定</el-button>
     </span>
     </span>
+      <UpLoadComponentDialog ref="upLoadComponentDialog" @getUpload="getUpload"></UpLoadComponentDialog>
       <WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
       <WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
       <WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>
       <WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>
     </el-dialog>
     </el-dialog>
@@ -268,6 +269,7 @@
   import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   import WorkContractChooseCom from '../projectRecords/WorkContractChooseCom'
   import WorkContractChooseCom from '../projectRecords/WorkContractChooseCom'
   import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
   import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
+  import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
   export default {
   export default {
     props: {
     props: {
       businessId: {
       businessId: {
@@ -354,9 +356,33 @@
       SelectTree,
       SelectTree,
       UserSelect,
       UserSelect,
       WorkClientChooseForm,
       WorkClientChooseForm,
-      WorkContractChooseCom
+      WorkContractChooseCom,
+      UpLoadComponentDialog
     },
     },
     methods: {
     methods: {
+      seeFileInfo (index) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
+          this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
+        }
+        this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+      },
+      sss (index) {
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
+          this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
+        }
+        this.$refs.upLoadComponentDialog.newUpload(null, this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+      },
+      getUpload (p, index) {
+        p.then((list) => {
+          // list为返回数据
+          this.inputForm.cwProjectInfoList[index].cwFileInfoList = list
+          this.inputForm.cwProjectInfoList[index].fileNumber = list.length
+          this.tableKeyClient = Math.random()
+          console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
+          console.log('list.length', list.length)
+          console.log(list)
+        })
+      },
       getKeyWatch (keyWatch) {
       getKeyWatch (keyWatch) {
         this.keyWatch = keyWatch
         this.keyWatch = keyWatch
       },
       },
@@ -369,7 +395,7 @@
           this.title = '项目详情'
           this.title = '项目详情'
           this.method = 'view'
           this.method = 'view'
         }
         }
-        this.activeName = 'client'
+        this.activeName = 'newRow'
         this.projectRecordsService = new ProjectRecordsService()
         this.projectRecordsService = new ProjectRecordsService()
         this.projectReportService = new ProjectReportService()
         this.projectReportService = new ProjectReportService()
         this.method = method
         this.method = method
@@ -475,6 +501,23 @@
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
             }
+            this.inputForm.cwProjectInfoList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
+                this.$message.error('报告日期不能为空')
+                this.loading = false
+                throw new Error('报告日期不能为空')
+              }
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
+                this.$message.error('报告类型不能为空')
+                this.loading = false
+                throw new Error('报告类型不能为空')
+              }
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
+                this.$message.error('意见类型不能为空')
+                this.loading = false
+                throw new Error('意见类型不能为空')
+              }
+            })
             this.projectReportService.saveForm(this.inputForm).then(({data}) => {
             this.projectReportService.saveForm(this.inputForm).then(({data}) => {
               callback(data.businessTable, data.businessId, this.inputForm)
               callback(data.businessTable, data.businessId, this.inputForm)
               this.loading = false
               this.loading = false
@@ -549,44 +592,45 @@
       },
       },
       // 新增
       // 新增
       // eslint-disable-next-line no-dupe-keys
       // eslint-disable-next-line no-dupe-keys
-      insertEvent (type) {
-        if (type === 'client') {
-          let d = {
-            no: '',
-            name: '',
-            companyLevel: ''
-          }
-          if (this.commonJS.isEmpty(this.inputForm.cwProjectClientInfoDTOList)) {
-            this.inputForm.cwProjectClientInfoDTOList = []
-          }
-          this.$refs.clientTable.insertAt(d)
-          this.inputForm.cwProjectClientInfoDTOList.push(d)
-          this.tableKeyClient = Math.random()
-        }
-      },
+      // insertEvent (type) {
+      //   if (type === 'client') {
+      //     let d = {
+      //       no: '',
+      //       name: '',
+      //       companyLevel: ''
+      //     }
+      //     if (this.commonJS.isEmpty(this.inputForm.cwProjectClientInfoDTOList)) {
+      //       this.inputForm.cwProjectClientInfoDTOList = []
+      //     }
+      //     this.$refs.clientTable.insertAt(d)
+      //     this.inputForm.cwProjectClientInfoDTOList.push(d)
+      //     this.tableKeyClient = Math.random()
+      //   }
+      // },
       // 删除
       // 删除
       removeEvent (row, rowIndex, type) {
       removeEvent (row, rowIndex, type) {
         if (type === 'client') {
         if (type === 'client') {
           this.$refs.clientTable.remove(row)
           this.$refs.clientTable.remove(row)
-          this.inputForm.cwProjectClientInfoDTOList.splice(rowIndex, 1)
+          // this.inputForm.cwProjectClientInfoDTOList.splice(rowIndex, 1)
+          this.inputForm.cwProjectInfoList.splice(rowIndex, 1)
         }
         }
       },
       },
       openWorkClient () {
       openWorkClient () {
         this.$refs.workClientChooseForm.init()
         this.$refs.workClientChooseForm.init()
       },
       },
       getWorkClientChoose (list) {
       getWorkClientChoose (list) {
-        if (this.commonJS.isEmpty(this.inputForm.cwProjectClientInfoDTOList)) {
-          this.inputForm.cwProjectClientInfoDTOList = []
+        if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList)) {
+          this.inputForm.cwProjectInfoList = []
         }
         }
         let _this = this
         let _this = this
         let _list = list
         let _list = list
         const waitForEach = function () {
         const waitForEach = function () {
           return new Promise(function (resolve, reject) {
           return new Promise(function (resolve, reject) {
             _list.forEach((item) => {
             _list.forEach((item) => {
-              _this.inputForm.cwProjectClientInfoDTOList.forEach(client => {
-                if (item.no === client.no) {
-                  _this.$message.error('已存在客户 “' + client.name + '”,请重新选择')
-                  throw new Error('已存在客户 “' + client.name + '”,请重新选择')
+              _this.inputForm.cwProjectInfoList.forEach(client => {
+                if (item.id === client.servedUnitId) {
+                  // _this.$message.error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
+                  // throw new Error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
                 }
                 }
               })
               })
             })
             })
@@ -595,8 +639,21 @@
         }
         }
         waitForEach().then(() => {
         waitForEach().then(() => {
           list.forEach(item => {
           list.forEach(item => {
-            this.$refs.clientTable.insertAt(item)
-            this.inputForm.cwProjectClientInfoDTOList.push(item)
+            // eslint-disable-next-line no-unused-vars
+            let d = {
+              servedUnitName: item.name, // 被服务单位名称
+              reportNumber: this.inputForm.projectNumber + '-0' + (this.inputForm.cwProjectInfoList.length + 1), // 报告流水号
+              issueReport: '是',
+              sealType: '未盖章',
+              id: this.uuid,
+              servedUnitId: item.id
+            }
+            console.log('新增行数据填入')
+            console.log('item', item)
+            console.log('d', d)
+            this.$refs.clientTable.insertAt(d)
+            this.inputForm.cwProjectInfoList.push(d)
+            console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
             this.tableKeyClient = Math.random()
             this.tableKeyClient = Math.random()
           })
           })
         })
         })
@@ -608,6 +665,7 @@
         this.inputForm.payerSubject = row.payerSubject
         this.inputForm.payerSubject = row.payerSubject
         this.inputForm.paymentMethod = row.paymentMethod
         this.inputForm.paymentMethod = row.paymentMethod
         this.inputForm.contractId = row.id
         this.inputForm.contractId = row.id
+        this.inputForm.cwProjectInfoList = []
       },
       },
       openContract () {
       openContract () {
         this.$refs.workContractChooseCom.init()
         this.$refs.workContractChooseCom.init()

+ 8 - 0
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -58,10 +58,18 @@
           :data="dataList"
           :data="dataList"
           :checkbox-config="{}">
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="单据编号" field="documentNo">
+            <template slot-scope="scope">
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cwProjectReport:list')" @click="view(scope.row.id)">{{scope.row.documentNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cwProjectReport:list')"  @click="view(scope.row.id,)">{{scope.row.documentNo}}</el-link>
+              <span v-else>{{scope.row.documentNo}}</span>
+            </template>
+          </vxe-column>
           <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目名称" field="projectName"></vxe-column>
           <vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
           <vxe-column min-width="160" align="center" title="报告所属部门" field="departmentName"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
           <vxe-column min-width="160" align="center" title="项目经理" field="projectMasterName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告主办人" field="reportSponsor"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建人" field="userName"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建人" field="userName"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
           <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
           <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
           <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >

+ 34 - 39
src/views/modules/cw/reportManagement/ReportManagementTaskForm.vue

@@ -49,12 +49,10 @@
                   :value="inputForm.officeId"
                   :value="inputForm.officeId"
                   :accordion="true"
                   :accordion="true"
                   @getValue="(value) => {inputForm.officeId=value}"/>
                   @getValue="(value) => {inputForm.officeId=value}"/>
-<!--                <el-input v-model="inputForm.officeId" placeholder="请填写报告所属部门" clearable></el-input>-->
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
-
             <el-col :span="12">
             <el-col :span="12">
-              <el-form-item label="项目经理" prop="projectMasterId"
+              <el-form-item v-if="inputForm.status !=='2'" label="项目经理" prop="projectMasterId"
                             :rules="[
                             :rules="[
                    ]">
                    ]">
                 <el-input :disabled="true" v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>
                 <el-input :disabled="true" v-model="inputForm.projectMasterId" placeholder="请填写项目经理" clearable></el-input>
@@ -102,6 +100,7 @@
             <el-col :span="12">
             <el-col :span="12">
               <el-form-item label="盖章类型" prop="signatureType"
               <el-form-item label="盖章类型" prop="signatureType"
                             :rules="[
                             :rules="[
+                              {required: true, message: '盖章类型不能为空', trigger: 'blur'}
                    ]">
                    ]">
 <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
 <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
                 <el-select v-model="inputForm.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">
                 <el-select v-model="inputForm.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">
@@ -170,18 +169,28 @@
 <!--                      <el-input :readonly="true" v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>-->
 <!--                      <el-input :readonly="true" v-model="scope.row.reportDate" placeholder="报告日期" clearable></el-input>-->
                     </template>
                     </template>
                   </vxe-table-column>
                   </vxe-table-column>
-                  <vxe-table-column align="center" field="reportType" title="报告类型" :edit-render="{}">
+                  <vxe-table-column align="center" field="reportType" title="报告类型" :edit-render="{name: '$select', options: $dictUtils.getDictList('cw_report_type')}">
                     <template v-slot:edit="scope">
                     <template v-slot:edit="scope">
-                      <el-select v-model="scope.row.reportType" placeholder="请选择报告类型" clearable style="width: 100%;">
-                        <el-option
+                      <vxe-select :disabled="formReadOnly" v-model="scope.row.reportType" placeholder="请选择报告类型" clearable style="width: 100%;" transfer>
+                        <vxe-option
                           v-for="item in $dictUtils.getDictList('cw_report_type')"
                           v-for="item in $dictUtils.getDictList('cw_report_type')"
                           :key="item.value"
                           :key="item.value"
                           :label="item.label"
                           :label="item.label"
                           :value="item.value">
                           :value="item.value">
-                        </el-option>
-                      </el-select>
-<!--                      <el-input v-model="scope.row.reportType" placeholder="报告类型" clearable></el-input>-->
+                        </vxe-option>
+                      </vxe-select>
                     </template>
                     </template>
+<!--                    <template v-slot:edit="scope">-->
+<!--                      <el-select v-model="scope.row.reportType" placeholder="请选择报告类型" clearable style="width: 100%;">-->
+<!--                        <el-option-->
+<!--                          v-for="item in $dictUtils.getDictList('cw_report_type')"-->
+<!--                          :key="item.value"-->
+<!--                          :label="item.label"-->
+<!--                          :value="item.value">-->
+<!--                        </el-option>-->
+<!--                      </el-select>-->
+<!--&lt;!&ndash;                      <el-input v-model="scope.row.reportType" placeholder="报告类型" clearable></el-input>&ndash;&gt;-->
+<!--                    </template>-->
                   </vxe-table-column>
                   </vxe-table-column>
                   <vxe-table-column align="center" field="reportNumber" title="报告流水号" :edit-render="{}">
                   <vxe-table-column align="center" field="reportNumber" title="报告流水号" :edit-render="{}">
                     <template v-slot:edit="scope">
                     <template v-slot:edit="scope">
@@ -225,7 +234,7 @@
                     <template v-slot="scope">
                     <template v-slot="scope">
                       <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
                       <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
                       <el-button size="mini" type="primary" @click="sss(scope.$rowIndex)">上传附件</el-button>
                       <el-button size="mini" type="primary" @click="sss(scope.$rowIndex)">上传附件</el-button>
-                      <el-button size="mini" :disabled="false" type="primary" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>
+                      <el-button size="mini" v-if="formReadOnly" :disabled="false" type="primary" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>
                     </template>
                     </template>
                   </vxe-table-column>
                   </vxe-table-column>
                 </vxe-table>
                 </vxe-table>
@@ -238,7 +247,8 @@
       </el-col>
       </el-col>
     </el-row>
     </el-row>
     <UpLoadComponentDialog ref="upLoadComponentDialog" @getUpload="getUpload"></UpLoadComponentDialog>
     <UpLoadComponentDialog ref="upLoadComponentDialog" @getUpload="getUpload"></UpLoadComponentDialog>
-    <ProjectInfoForm  ref="projectInfoForm" @getContract="getContract"></ProjectInfoForm>
+<!--    <ProjectInfoForm  ref="projectInfoForm" @getContract="getContract"></ProjectInfoForm>-->
+    <ProjectRecoredChooseCom  ref="projectRecoredChooseCom" @getContract="getContract"></ProjectRecoredChooseCom>
     <ReportServiceUnitForm ref="reportServiceUnitForm" @getWorkClientChoose="getWorkClientChoose"></ReportServiceUnitForm>
     <ReportServiceUnitForm ref="reportServiceUnitForm" @getWorkClientChoose="getWorkClientChoose"></ReportServiceUnitForm>
   </div>
   </div>
 </template>
 </template>
@@ -254,7 +264,8 @@
   // import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   // import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   import ReportServiceUnitForm from './ReportServiceUnitForm'
   import ReportServiceUnitForm from './ReportServiceUnitForm'
   import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
   import UpLoadComponentDialog from '@/views/common/UpLoadComponentDialog'
-  import ProjectInfoForm from './ProjectInfoForm'
+  // import ProjectInfoForm from './ProjectInfoForm'
+  import ProjectRecoredChooseCom from '../projectRecords/ProjectRecordsChooseCom'
   export default {
   export default {
     props: {
     props: {
       businessId: {
       businessId: {
@@ -294,7 +305,8 @@
           projectMasterId: '',
           projectMasterId: '',
           cwProjectInfoList: [],
           cwProjectInfoList: [],
           cwFileInfoList: [],
           cwFileInfoList: [],
-          servedUnitId: ''
+          servedUnitId: '',
+          status: ''
         },
         },
         keyWatch: '',
         keyWatch: '',
         activeName: 'newRow',
         activeName: 'newRow',
@@ -340,7 +352,8 @@
       SelectTree,
       SelectTree,
       UserSelect,
       UserSelect,
       ReportServiceUnitForm,
       ReportServiceUnitForm,
-      ProjectInfoForm,
+      // ProjectInfoForm,
+      ProjectRecoredChooseCom,
       UpLoadComponentDialog
       UpLoadComponentDialog
     },
     },
     methods: {
     methods: {
@@ -348,7 +361,7 @@
         if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
         if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = []
         }
         }
-        this.$refs.upLoadComponentDialog.newUpload(null, this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
+        this.$refs.upLoadComponentDialog.newUpload('view', this.inputForm.cwProjectInfoList[index].cwFileInfoList, null, null, null, null, null, false, index)
       },
       },
       sss (index) {
       sss (index) {
         if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
         if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].cwFileInfoList)) {
@@ -461,9 +474,11 @@
       },
       },
       openContractForm () {
       openContractForm () {
         if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
         if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
-          this.$refs.projectInfoForm.init(this.inputForm.contractId)
+          // this.$refs.projectInfoForm.init(this.inputForm.contractId)
+          this.$refs.projectRecoredChooseCom.init(this.inputForm.contractId)
         } else {
         } else {
-          this.$refs.projectInfoForm.init()
+          this.$refs.projectRecoredChooseCom.init()
+          // this.$refs.projectInfoForm.init()
         }
         }
       },
       },
       getContract (row) {
       getContract (row) {
@@ -520,26 +535,6 @@
           this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
           this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
           // 验证报告 日期报告 类型是否出具报告 意见类型 是否为空
           // 验证报告 日期报告 类型是否出具报告 意见类型 是否为空
           // eslint-disable-next-line no-unused-expressions
           // eslint-disable-next-line no-unused-expressions
-          this.inputForm.cwProjectInfoList.forEach((item, index) => {
-            if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
-              this.$message.error('报告日期不能为空')
-              throw new Error('报告日期不能为空')
-              // eslint-disable-next-line no-unreachable
-              this.loading = false
-            }
-            if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
-              this.$message.error('报告类型不能为空')
-              throw new Error('报告类型不能为空')
-              // eslint-disable-next-line no-unreachable
-              this.loading = false
-            }
-            if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
-              this.$message.error('意见类型不能为空')
-              throw new Error('意见类型不能为空')
-              // eslint-disable-next-line no-unreachable
-              this.loading = false
-            }
-          })
           this.projectReportService.saveForm(this.inputForm).then(({data}) => {
           this.projectReportService.saveForm(this.inputForm).then(({data}) => {
             callback(data.businessTable, data.businessId, this.inputForm)
             callback(data.businessTable, data.businessId, this.inputForm)
             this.loading = false
             this.loading = false
@@ -689,8 +684,8 @@
             _list.forEach((item) => {
             _list.forEach((item) => {
               _this.inputForm.cwProjectInfoList.forEach(client => {
               _this.inputForm.cwProjectInfoList.forEach(client => {
                 if (item.id === client.servedUnitId) {
                 if (item.id === client.servedUnitId) {
-                  _this.$message.error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
-                  throw new Error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
+                  // _this.$message.error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
+                  // throw new Error('已存在客户 “' + client.servedUnitName + '”,请重新选择')
                 }
                 }
               })
               })
             })
             })