소스 검색

添加报告关联以及发票关联

lizhenhao 2 년 전
부모
커밋
c91a0e32ad

+ 7 - 0
src/api/cw/invoice/CwFinanceInvoiceService.js

@@ -99,4 +99,11 @@ export default class CwFinanceInvoiceService {
       params: {contractId: contractId, ...invoiceForm}
     })
   }
+  getIdByClientId (clientId, invoiceForm) {
+    return request({
+      url: '/cw_finance/invoice/getIdByClientId',
+      method: 'get',
+      params: {clientId: clientId, ...invoiceForm}
+    })
+  }
 }

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

@@ -108,4 +108,25 @@ export default class ProjectReportService {
       params: {id: id, signatureType: signatureType}
     })
   }
+  getIdByContractId (contractId, reportForm) {
+    return request({
+      url: '/cwProjectReport/getIdByContractId',
+      method: 'get',
+      params: {contractId: contractId, ...reportForm}
+    })
+  }
+  getIdByProjectId (projectId, reportForm) {
+    return request({
+      url: '/cwProjectReport/getIdByProjectId',
+      method: 'get',
+      params: {projectId: projectId, ...reportForm}
+    })
+  }
+  getIdByClientId (clientId, reportForm) {
+    return request({
+      url: '/cwProjectReport/getIdByClientId',
+      method: 'get',
+      params: {clientId: clientId, ...reportForm}
+    })
+  }
 }

+ 90 - 3
src/views/modules/cw/projectRecords/ProjectRecordsForm.vue

@@ -315,6 +315,59 @@
 
             </el-tabs>
           </el-tab-pane>
+          <el-tab-pane label="关联报告" name="report">
+            <el-form size="small" :inline="true" class="query-form" style="margin-bottom: 0;padding-top: 2px;padding-left: 0" ref="reportForm" :model="reportForm" @keyup.enter.native="searchReport()" @submit.native.prevent>
+              <!-- 搜索框-->
+              <el-form-item label="报告文号" prop="reportNo">
+                <el-input size="small" v-model="reportForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+              </el-form-item>
+              <el-form-item label="项目名称" prop="projectName">
+                <el-input size="small" v-model="reportForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+              </el-form-item>
+              <el-form-item label="项目编号" prop="projectNumber">
+                <el-input size="small" v-model="reportForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+              </el-form-item>
+
+              <el-form-item>
+                <el-button type="primary" @click="searchReport()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="refreshReportForm()" size="small" icon="el-icon-refresh-right">重置</el-button>
+              </el-form-item>
+            </el-form>
+            <vxe-table
+              max-height="500"
+              border="inner"
+              auto-resize
+              resizable
+              height="auto"
+              :loading="loading"
+              size="medium"
+              ref="reportTable"
+              show-header-overflow
+              show-overflow
+              highlight-hover-row
+              :menu-config="{}"
+              @sort-change=""
+              :sort-config="{remote:true}"
+              :data="reportList"
+              :checkbox-config="{}">
+              <vxe-column type="seq" width="60" title="序号"></vxe-column>
+              <vxe-column min-width="200" title="报告文号"align="center" field="reportNo">
+                <template slot-scope="scope">
+                  <el-link  type="primary" :underline="false" @click="viewReport(scope.row.id)">{{scope.row.reportNo}}</el-link>
+                </template>
+              </vxe-column>
+              <vxe-column min-width="200" title="项目名称"align="center" field="projectName">
+                <template slot-scope="scope">
+                  <el-link  type="primary" :underline="false" @click="viewProject(scope.row.projectId)">{{scope.row.projectName}}</el-link>
+                </template>
+              </vxe-column>
+              <vxe-column min-width="200" title="项目编号"align="center" field="projectNumber"></vxe-column>
+              <vxe-column min-width="150" title="所属部门"align="center" field="officeName"></vxe-column>
+              <vxe-column min-width="150" title="项目经理"align="center" field="projectMasterName"></vxe-column>
+              <vxe-column min-width="120" title="报告创建人"align="center" field="createName"></vxe-column>
+              <vxe-column min-width="180" title="报告创建时间"align="center" field="createDate"></vxe-column>
+            </vxe-table>
+          </el-tab-pane>
           <el-tab-pane label="关联发票" name="invoice">
             <el-form size="small" :inline="true" class="query-form" style="margin-bottom: 0;padding-top: 2px;padding-left: 0" ref="invoiceForm" :model="invoiceForm" @keyup.enter.native="searchInvoice()" @submit.native.prevent>
               <!-- 搜索框-->
@@ -378,7 +431,8 @@
       <CwProjectBusinessTypeListForm ref="cwProjectBusinessTypeListForm" @getBusinessType="getBusinessType"></CwProjectBusinessTypeListForm>
       <ContractNameForm ref="contractNameForm"></ContractNameForm>
       <InvoiceForm ref="invoiceFormDialog"></InvoiceForm>
-
+      <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>
+      <ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
     </el-dialog>
   </div>
 </template>
@@ -389,6 +443,7 @@
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
   import UserSelect from '@/components/userSelect'
   import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
   import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
   import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
   import WorkContractChooseCom from './WorkContractChooseCom'
@@ -398,6 +453,7 @@
   import ContractInfoService from '@/api/cw/workContract/ContractInfoService'
   import CwFinanceInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
   export default {
+    name: 'ProjectRecordsForm',
     props: {
       businessId: {
         type: String,
@@ -461,7 +517,13 @@
         invoiceList: [],
         invoiceForm: {
           no: ''
-        }
+        },
+        reportForm: {
+          reportNo: '',
+          projectName: '',
+          projectNumber: ''
+        },
+        reportList: []
       }
     },
     projectRecordsService: null,
@@ -469,12 +531,14 @@
     workClientService: null,
     contractInfoService: null,
     cwFinanceInvoiceService: null,
+    projectReportService: null,
     created () {
       this.enterpriseSearchService = new EnterpriseSearchService()
       this.projectRecordsService = new ProjectRecordsService()
       this.workClientService = new WorkClientService()
       this.contractInfoService = new ContractInfoService()
       this.cwFinanceInvoiceService = new CwFinanceInvoiceService()
+      this.projectReportService = new ProjectReportService()
     },
     computed: {
       bus: {
@@ -509,7 +573,8 @@
       WorkContractChooseCom,
       CwProjectBusinessTypeListForm,
       ContractNameForm,
-      InvoiceForm: () => import('../invoice/InvoiceForm')
+      InvoiceForm: () => import('../invoice/InvoiceForm'),
+      ReportManagementForm: () => import('../reportManagement/ReportManagementForm')
     },
     methods: {
       getKeyWatch (keyWatch) {
@@ -602,6 +667,7 @@
             if (this.commonJS.isEmpty(this.inputForm.projectMoney)) {
               this.inputForm.projectMoney = 0
             }
+            // 获取关联发票信息
             this.cwFinanceInvoiceService.getByIds(this.inputForm.id, this.invoiceForm).then(({data}) => {
               let _this = this
               let _data = data
@@ -635,6 +701,10 @@
                 })
               })
             })
+            // 获取关联报告信息
+            this.projectReportService.getIdByProjectId(this.inputForm.id, this.reportForm).then(({data}) => {
+              this.reportList = data
+            })
             this.loading = false
           })
         })
@@ -958,6 +1028,23 @@
       },
       viewInvoice (flag, id) {
         this.$refs.invoiceFormDialog.init(flag, id)
+      },
+      searchReport () {
+        this.loading = true
+        this.projectReportService.getIdByProjectId(this.inputForm.id, this.reportForm).then(({data}) => {
+          this.reportList = data
+          this.loading = false
+        })
+      },
+      refreshReportForm () {
+        this.$refs.reportForm.resetFields()
+        this.searchReport()
+      },
+      viewReport (id) {
+        this.$refs.reportManagementForm.init('view', id)
+      },
+      viewProject (id) {
+        this.$refs.projectRecordsForm.init('view', id)
       }
     }
   }

+ 3 - 2
src/views/modules/cw/reportManagement/ReportManagementForm.vue

@@ -7,6 +7,7 @@
       width="1400px"
       height="500px"
       @close="close"
+      append-to-body
       @keyup.enter.native=""
       :visible.sync="visible">
       <el-row>
@@ -584,10 +585,10 @@
       init (method, id) {
         this.visible = true
         if (method === 'edit') {
-          this.title = '项目信息修改'
+          this.title = '报告信息修改'
           this.method = method
         } else {
-          this.title = '项目详情'
+          this.title = '报告详情'
           this.method = 'view'
         }
         this.activeName = 'archiveFile'

+ 228 - 4
src/views/modules/cw/workClientInfo/WorkClientForm.vue

@@ -788,6 +788,110 @@
               <vxe-column min-width="160" align="center" title="创建日期" field="createDate"></vxe-column>
             </vxe-table>
           </el-tab-pane>
+          <el-tab-pane label="关联报告" name="report">
+            <el-form size="small" :inline="true" class="query-form" style="margin-bottom: 0;padding-top: 2px;padding-left: 0" ref="reportForm" :model="reportForm" @keyup.enter.native="searchReport()" @submit.native.prevent>
+              <!-- 搜索框-->
+              <el-form-item label="报告文号" prop="reportNo">
+                <el-input size="small" v-model="reportForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+              </el-form-item>
+              <el-form-item label="项目名称" prop="projectName">
+                <el-input size="small" v-model="reportForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+              </el-form-item>
+              <el-form-item label="项目编号" prop="projectNumber">
+                <el-input size="small" v-model="reportForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+              </el-form-item>
+
+              <el-form-item>
+                <el-button type="primary" @click="searchReport()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="refreshReportForm()" size="small" icon="el-icon-refresh-right">重置</el-button>
+              </el-form-item>
+            </el-form>
+            <vxe-table
+              max-height="500"
+              border="inner"
+              auto-resize
+              resizable
+              height="auto"
+              :loading="loading"
+              size="medium"
+              ref="reportTable"
+              show-header-overflow
+              show-overflow
+              highlight-hover-row
+              :menu-config="{}"
+              @sort-change=""
+              :sort-config="{remote:true}"
+              :data="reportList"
+              :checkbox-config="{}">
+              <vxe-column type="seq" width="60" title="序号"></vxe-column>
+              <vxe-column min-width="200" title="报告文号"align="center" field="reportNo">
+                <template slot-scope="scope">
+                  <el-link  type="primary" :underline="false" @click="viewReport(scope.row.id)">{{scope.row.reportNo}}</el-link>
+                </template>
+              </vxe-column>
+              <vxe-column min-width="200" title="项目名称"align="center" field="projectName">
+                <template slot-scope="scope">
+                  <el-link  type="primary" :underline="false" @click="viewProject(scope.row.projectId)">{{scope.row.projectName}}</el-link>
+                </template>
+              </vxe-column>
+              <vxe-column min-width="200" title="项目编号"align="center" field="projectNumber"></vxe-column>
+              <vxe-column min-width="150" title="所属部门"align="center" field="officeName"></vxe-column>
+              <vxe-column min-width="150" title="项目经理"align="center" field="projectMasterName"></vxe-column>
+              <vxe-column min-width="120" title="报告创建人"align="center" field="createName"></vxe-column>
+              <vxe-column min-width="180" title="报告创建时间"align="center" field="createDate"></vxe-column>
+            </vxe-table>
+          </el-tab-pane>
+          <el-tab-pane label="关联发票" name="invoice">
+            <el-form size="small" :inline="true" class="query-form" style="margin-bottom: 0;padding-top: 2px;padding-left: 0" ref="invoiceForm" :model="invoiceForm" @keyup.enter.native="searchInvoice()" @submit.native.prevent>
+              <!-- 搜索框-->
+              <el-form-item label="发票申请编号" prop="no">
+                <el-input size="small" v-model="invoiceForm.no" placeholder="请输入发票申请编号" clearable></el-input>
+              </el-form-item>
+
+              <el-form-item>
+                <el-button type="primary" @click="searchInvoice()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="refreshInvoiceForm()" size="small" icon="el-icon-refresh-right">重置</el-button>
+              </el-form-item>
+            </el-form>
+            <vxe-table
+              max-height="500"
+              border="inner"
+              auto-resize
+              resizable
+              height="auto"
+              :loading="loading"
+              size="medium"
+              ref="invoiceTable"
+              show-header-overflow
+              show-overflow
+              highlight-hover-row
+              :menu-config="{}"
+              @sort-change=""
+              :sort-config="{remote:true}"
+              :data="invoiceList"
+              :checkbox-config="{}">
+              <vxe-column type="seq" width="60" title="序号"></vxe-column>
+              <vxe-column min-width="150" title="发票申请编号"align="center" field="no">
+                <template slot-scope="scope">
+                  <el-link  type="primary" :underline="false" @click="viewInvoice(false, scope.row.id)">{{scope.row.no}}</el-link>
+                </template>
+              </vxe-column>
+              <vxe-column min-width="150" title="发票号"align="center" field="number"></vxe-column>
+              <vxe-column min-width="150" title="实际开票单位"align="center" field="billingWorkplaceReal"></vxe-column>
+              <vxe-column min-width="150" title="开票金额(元)"align="center" field="accountDetail"></vxe-column>
+              <vxe-column min-width="150" title="开票总金额(元)"align="center" field="account"></vxe-column>
+              <vxe-column min-width="120" title="开票内容"align="center" field="billingContent">
+                <template slot-scope="scope">
+                  {{$dictUtils.getDictLabel('invoice_billing_content', scope.row.billingContent, '-')}}
+                </template>
+              </vxe-column>
+              <vxe-column min-width="110" fixed="right"align="center" title="是否收款" field="receivablesStatus">
+                <template slot-scope="scope">
+                  {{scope.row.receivablesStatus === '1'?'已收款':'未收款'}}
+                </template>
+              </vxe-column>
+            </vxe-table>
+          </el-tab-pane>
         </el-tabs>
       </el-col>
     </el-row>
@@ -801,6 +905,8 @@
     <OrganizationTypeListForm ref="organizationTypeListForm" @getOrganizationType="getOrganizationType"></OrganizationTypeListForm>
     <ProjectRecordsForm ref="projectRecordsForm" @refreshList=""></ProjectRecordsForm>
     <ContractNameForm ref="contractNameForm"></ContractNameForm>
+    <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>
+    <InvoiceForm ref="invoiceFormDialog"></InvoiceForm>
   </div>
 </template>
 
@@ -818,6 +924,8 @@
   import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
   import ContractInfoService from '@/api/cw/workContract/ContractInfoService'
   import ContractNameForm from '../workContract/ContractNameForm'
+  import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
+  import CwFinanceInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
   export default {
     props: {
       businessId: {
@@ -972,6 +1080,16 @@
         contractForm: {
           contractName: '',
           contractNo: ''
+        },
+        reportForm: {
+          reportNo: '',
+          projectName: '',
+          projectNumber: ''
+        },
+        reportList: [],
+        invoiceList: [],
+        invoiceForm: {
+          no: ''
         }
       }
     },
@@ -979,11 +1097,15 @@
     enterpriseSearchService: null,
     projectRecordsService: null,
     contractInfoService: null,
+    projectReportService: null,
+    cwFinanceInvoiceService: null,
     created () {
       this.enterpriseSearchService = new EnterpriseSearchService()
       this.workClientService = new WorkClientService()
       this.projectRecordsService = new ProjectRecordsService()
       this.contractInfoService = new ContractInfoService()
+      this.projectReportService = new ProjectReportService()
+      this.cwFinanceInvoiceService = new CwFinanceInvoiceService()
     },
     computed: {
       bus: {
@@ -1018,7 +1140,9 @@
       ManageLevelTypeListForm,
       OrganizationTypeListForm,
       ProjectRecordsForm,
-      ContractNameForm
+      ContractNameForm,
+      ReportManagementForm: () => import('../reportManagement/ReportManagementForm'),
+      InvoiceForm: () => import('../invoice/InvoiceForm')
     },
     methods: {
       getKeyWatch (keyWatch) {
@@ -1160,13 +1284,53 @@
                 item.disabledTaxpayerIdentificationNo = false
               }
             })
+            // 获取关联项目信息
             this.projectRecordsService.getByClientId(this.inputForm.id, this.projectForm).then(({data}) => {
               this.projectList = data
-              this.contractInfoService.getByClientId(this.inputForm.id, this.contractForm).then(({data}) => {
-                this.contractList = data
-                this.loading = false
+            })
+            // 获取关联合同信息
+            this.contractInfoService.getByClientId(this.inputForm.id, this.contractForm).then(({data}) => {
+              this.contractList = data
+            })
+            // 获取关联报告信息
+            this.projectReportService.getIdByClientId(this.inputForm.id, this.reportForm).then(({data}) => {
+              this.reportList = data
+            })
+            // 查询关联发票信息
+            this.cwFinanceInvoiceService.getIdByClientId(this.inputForm.id, this.invoiceForm).then(({data}) => {
+              let _this = this
+              let _data = data
+              const wait = function () {
+                return new Promise((resolve, reject) => {
+                  _this.invoiceList = _data
+                  resolve()
+                })
+              }
+              wait().then(() => {
+                this.invoiceList.forEach(item => {
+                  item.account = parseFloat(item.account).toFixed(2)
+                  if (!this.commonJS.isEmpty(item.financeInvoiceDetailDTOList)) {
+                    item.accountDetail = 0
+                    let num = ''
+                    item.financeInvoiceDetailDTOList.forEach((detail, index) => {
+                      if (!this.commonJS.isEmpty(detail.account)) {
+                        item.accountDetail = parseFloat(parseFloat(item.accountDetail) + parseFloat(detail.account)).toFixed(2)
+                      }
+                      if ((index + 1) !== item.financeInvoiceDetailDTOList.length) {
+                        num = num + detail.number + ','
+                      } else {
+                        num = num + detail.number
+                      }
+                    })
+                    item.number = num
+                  } else {
+                    item.number = ''
+                    item.accountDetail = ''
+                  }
+                })
               })
             })
+            this.loading = false
           })
         })
       },
@@ -1689,6 +1853,66 @@
       refreshContractForm () {
         this.$refs.contractForm.resetFields()
         this.searchContract()
+      },
+      searchReport () {
+        this.loading = true
+        this.projectReportService.getIdByClientId(this.inputForm.id, this.reportForm).then(({data}) => {
+          this.reportList = data
+          this.loading = false
+        })
+      },
+      refreshReportForm () {
+        this.$refs.reportForm.resetFields()
+        this.searchReport()
+      },
+      viewReport (id) {
+        this.$refs.reportManagementForm.init('view', id)
+      },
+      searchInvoice () {
+        this.loading = true
+        this.cwFinanceInvoiceService.getIdByClientId(this.inputForm.id, this.invoiceForm).then(({data}) => {
+          let _this = this
+          let _data = data
+          const wait = function () {
+            return new Promise((resolve, reject) => {
+              _this.invoiceList = _data
+              resolve()
+            })
+          }
+          wait().then(() => {
+            this.invoiceList.forEach(item => {
+              item.account = parseFloat(item.account).toFixed(2)
+              if (!this.commonJS.isEmpty(item.financeInvoiceDetailDTOList)) {
+                item.accountDetail = 0
+                let num = ''
+                item.financeInvoiceDetailDTOList.forEach((detail, index) => {
+                  if (!this.commonJS.isEmpty(detail.account)) {
+                    item.accountDetail = parseFloat(parseFloat(item.accountDetail) + parseFloat(detail.account)).toFixed(2)
+                  }
+                  if ((index + 1) !== item.financeInvoiceDetailDTOList.length) {
+                    num = num + detail.number + ','
+                  } else {
+                    num = num + detail.number
+                  }
+                })
+                item.number = num
+              } else {
+                item.number = ''
+                item.accountDetail = ''
+              }
+            })
+          })
+          this.loading = false
+        }).catch(() => {
+          this.loading = false
+        })
+      },
+      refreshInvoiceForm () {
+        this.$refs.invoiceForm.resetFields()
+        this.searchInvoice()
+      },
+      viewInvoice (flag, id) {
+        this.$refs.invoiceFormDialog.init(flag, id)
       }
     }
   }

+ 84 - 2
src/views/modules/cw/workContract/ContractNameForm.vue

@@ -347,6 +347,59 @@
             <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
           </vxe-table>
         </el-tab-pane>
+        <el-tab-pane label="关联报告" name="report">
+          <el-form size="small" :inline="true" class="query-form" style="margin-bottom: 0;padding-top: 2px;padding-left: 0" ref="reportForm" :model="reportForm" @keyup.enter.native="searchReport()" @submit.native.prevent>
+            <!-- 搜索框-->
+            <el-form-item label="报告文号" prop="reportNo">
+              <el-input size="small" v-model="reportForm.reportNo" placeholder="请输入报告文号" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="项目名称" prop="projectName">
+              <el-input size="small" v-model="reportForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="项目编号" prop="projectNumber">
+              <el-input size="small" v-model="reportForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" @click="searchReport()" size="small" icon="el-icon-search">查询</el-button>
+              <el-button @click="refreshReportForm()" size="small" icon="el-icon-refresh-right">重置</el-button>
+            </el-form-item>
+          </el-form>
+          <vxe-table
+            max-height="500"
+            border="inner"
+            auto-resize
+            resizable
+            height="auto"
+            :loading="loading"
+            size="medium"
+            ref="reportTable"
+            show-header-overflow
+            show-overflow
+            highlight-hover-row
+            :menu-config="{}"
+            @sort-change=""
+            :sort-config="{remote:true}"
+            :data="reportList"
+            :checkbox-config="{}">
+            <vxe-column type="seq" width="60" title="序号"></vxe-column>
+            <vxe-column min-width="200" title="报告文号"align="center" field="reportNo">
+              <template slot-scope="scope">
+                <el-link  type="primary" :underline="false" @click="viewReport(scope.row.id)">{{scope.row.reportNo}}</el-link>
+              </template>
+            </vxe-column>
+            <vxe-column min-width="200" title="项目名称"align="center" field="projectName">
+              <template slot-scope="scope">
+                <el-link  type="primary" :underline="false" @click="viewProject(scope.row.projectId)">{{scope.row.projectName}}</el-link>
+              </template>
+            </vxe-column>
+            <vxe-column min-width="200" title="项目编号"align="center" field="projectNumber"></vxe-column>
+            <vxe-column min-width="150" title="所属部门"align="center" field="officeName"></vxe-column>
+            <vxe-column min-width="150" title="项目经理"align="center" field="projectMasterName"></vxe-column>
+            <vxe-column min-width="120" title="报告创建人"align="center" field="createName"></vxe-column>
+            <vxe-column min-width="180" title="报告创建时间"align="center" field="createDate"></vxe-column>
+          </vxe-table>
+        </el-tab-pane>
         <el-tab-pane label="关联发票" name="invoice">
           <el-form size="small" :inline="true" class="query-form" style="margin-bottom: 0;padding-top: 2px;padding-left: 0" ref="invoiceForm" :model="invoiceForm" @keyup.enter.native="searchInvoice()" @submit.native.prevent>
             <!-- 搜索框-->
@@ -415,6 +468,7 @@
       <WorkClientForm ref="workClientForm"></WorkClientForm>
       <ProjectRecordsForm ref="projectRecordsForm"></ProjectRecordsForm>
       <InvoiceForm ref="invoiceFormDialog"></InvoiceForm>
+      <ReportManagementForm ref="reportManagementForm"></ReportManagementForm>
     </el-dialog>
   </div>
 </template>
@@ -438,6 +492,7 @@
   import moment from 'moment'
   import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
   import CwFinanceInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
+  import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
   // import ProjectRecordsForm from '../projectRecords/ProjectRecordsForm'
   export default {
     data () {
@@ -542,7 +597,13 @@
         invoiceList: [],
         invoiceForm: {
           no: ''
-        }
+        },
+        reportForm: {
+          reportNo: '',
+          projectName: '',
+          projectNumber: ''
+        },
+        reportList: []
       }
     },
     props: {
@@ -567,7 +628,8 @@
       WorkClientChooseRadio,
       WorkClientForm: () => import('../workClientInfo/WorkClientForm'),
       ProjectRecordsForm: () => import('../projectRecords/ProjectRecordsForm'),
-      InvoiceForm: () => import('../invoice/InvoiceForm')
+      InvoiceForm: () => import('../invoice/InvoiceForm'),
+      ReportManagementForm: () => import('../reportManagement/ReportManagementForm')
     },
     ossService: null,
     // workContractService: null,
@@ -575,6 +637,7 @@
     contractFileService: null,
     projectRecordsService: null,
     cwFinanceInvoiceService: null,
+    projectReportService: null,
     created () {
       this.ossService = new OSSSerive()
       // this.workContractService = new WorkContractService()
@@ -582,6 +645,7 @@
       this.contractFileService = new ContractFileService()
       this.projectRecordsService = new ProjectRecordsService()
       this.cwFinanceInvoiceService = new CwFinanceInvoiceService()
+      this.projectReportService = new ProjectReportService()
     },
     mounted () {
       window.onPreview = this.onPreview
@@ -740,6 +804,10 @@
           this.projectRecordsService.getByContractId(this.inputForm.id).then((project) => {
             this.projectList = project.data
           })
+          // 获取关联报告信息
+          this.projectReportService.getIdByContractId(this.inputForm.id, this.reportForm).then(({data}) => {
+            this.reportList = data
+          })
           // 查询关联发票信息
           this.cwFinanceInvoiceService.getByContractId(this.inputForm.id, this.invoiceForm).then(({data}) => {
             let _this = this
@@ -1120,6 +1188,20 @@
       },
       viewInvoice (flag, id) {
         this.$refs.invoiceFormDialog.init(flag, id)
+      },
+      searchReport () {
+        this.loading = true
+        this.projectReportService.getIdByContractId(this.inputForm.id, this.reportForm).then(({data}) => {
+          this.reportList = data
+          this.loading = false
+        })
+      },
+      refreshReportForm () {
+        this.$refs.reportForm.resetFields()
+        this.searchReport()
+      },
+      viewReport (id) {
+        this.$refs.reportManagementForm.init('view', id)
       }
     }
   }