<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
  <div>
    <el-row>
      <el-col :span="24">

        <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status ==='taskFormDetail'"
                 label-width="135px" @submit.native.prevent>
          <el-row  :gutter="15">
            <el-col :span="24">
              <el-form-item label="报告文号" prop="reportNo"
                            :rules="[
                              {required: true, message:'报告文号不能为空', trigger:'blur'},
                              {required: true, message:'报告文号不能为空', trigger:'change'}
                   ]">
                <el-input :readonly="true" @focus="openContractForm()" v-model="inputForm.reportNo" placeholder="请填写报告文号">
                  <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row :disabled="true">
            <el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
            <el-row  :gutter="15">
              <el-col :span="12">
                <el-form-item  label="项目名称" prop="reportDetail.projectName"
                              :rules="[
                   ]">
                  <el-input :disabled="true" :readonly="true" @focus="openContractForm()" v-model="inputForm.reportDetail.projectName" placeholder="请选择项目名称">
                    <el-button slot="append" :disabled="true" icon="el-icon-search" @click="openContractForm()"></el-button>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="项目编号" prop="reportDetail.projectNumber"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.projectNumber" placeholder="请填写项目编号" clearable></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="项目经理1" prop="reportDetail.projectMasterName"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.projectMasterName" placeholder="请填写项目经理1" clearable></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="项目经理2" prop="reportDetail.realHeaderName"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.realHeaderName" placeholder="请填写项目经理2" clearable></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
            <el-row  :gutter="15">
              <el-col :span="12">
                <el-form-item label="单据编号" prop="reportDetail.documentNo"
                              :rules="[

                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.documentNo" placeholder="自动生成" clearable></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报告所属部门" prop="reportDetail.officeId"
                              :rules="[
                   ]">
                  <SelectTree
                    ref="officeTree"
                    :props="{
                  value: 'id',             // ID字段名
                  label: 'name',         // 显示名称
                  children: 'children'    // 子级字段名
                }"

                    :url="`/system-server/sys/office/treeData?type=2`"
                    :value="inputForm.reportDetail.officeId"
                    :accordion="true"
                    :disabled="true"
                    size="default"
                    @getValue="(value) => {inputForm.reportDetail.officeId=value}"/>
                  <!--                <el-input v-model="inputForm.officeId" placeholder="请填写报告所属部门" clearable></el-input>-->
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="盖章类型" prop="reportDetail.signatureType"
                              :rules="[
                   ]">
                  <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
                  <el-select :disabled="true" v-model="inputForm.reportDetail.signatureType" placeholder="请选择盖章类型" clearable style="width: 100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_signature_type')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col v-if="inputForm.reportDetail.signatureType === '1'|| inputForm.reportDetail.signatureType === '3' || commonJS.isEmpty(inputForm.reportDetail.signatureType)" :span="12">
                <el-form-item label="签字注师1" prop="reportDetail.signatureAnnotator1"
                              :rules="[
                   ]">
                  <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
                  <UserSelect :disabled="true" ref="userSelect1" :readonly="true" :limit='1' :modelValue="inputForm.reportDetail.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
                </el-form-item>
              </el-col>

              <el-col v-if="inputForm.reportDetail.signatureType === '1'|| inputForm.reportDetail.signatureType === '3' || commonJS.isEmpty(inputForm.reportDetail.signatureType)" :span="12">
                <el-form-item label="签字注师2" prop="reportDetail.signatureAnnotator2"
                              :rules="[
                   ]">
                  <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
                  <UserSelect ref="userSelect2" :disabled="true" :readonly="true" :limit='1' :modelValue="inputForm.reportDetail.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
                </el-form-item>
              </el-col>

              <el-col v-if="inputForm.reportDetail.signatureType === '2' " :span="12">
                <el-form-item label="签字注师1" prop="reportDetail.signatureAnnotator1"
                              :rules="[
                              {required: true, message:'签字注师1不能为空', trigger:'blur'}
                   ]">
                  <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
                  <UserSelect ref="userSelect1" :disabled="true" :readonly="true" :limit='1' :modelValue="inputForm.reportDetail.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
                </el-form-item>
              </el-col>
              <el-col v-if="inputForm.reportDetail.signatureType === '2' " :span="12">
                <el-form-item label="签字注师2" prop="reportDetail.signatureAnnotator2"
                              :rules="[
                              {required: true, message:'签字注师2不能为空', trigger:'blur'}
                   ]">
                  <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
                  <UserSelect ref="userSelect2" :disabled="true" :readonly="true" :limit='1' :modelValue="inputForm.reportDetail.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="审计意见类型" prop="reportDetail.opinionType"
                              :rules="[
                     ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.opinionType" placeholder="请选择审计意见类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_opinion_type')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="审计收费(税前、元)" prop="reportDetail.auditFees"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.auditFees" placeholder="请填写审计收费(税前、元)" clearable
                            @keyup.native="inputForm.reportDetail.auditFees = twoDecimalPlaces(inputForm.reportDetail.auditFees)"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报告实际制作人" prop="reportDetail.realCreate"
                              :rules="[
                   ]">
                  <UserSelectAll  :readonly="true" :disabled="true" :limit='1' :modelValue="inputForm.reportDetail.realCreate" @update:modelValue='(value) => {inputForm.reportDetail.realCreate = value}'></UserSelectAll>
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="创建时间" prop="reportDetail.createTime"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.createTime" placeholder="请填写创建时间" clearable></el-input>
                </el-form-item>
              </el-col>

            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i> 报告信息</el-divider>
            <el-row  :gutter="15">
              <el-col :span="12">
                <el-form-item label="被服务单位" prop="reportDetail.servedUnitName"
                              :rules="[
                   ]">
                  <el-input :readonly="true" :disabled="true" @focus="openWorkClient()" v-model="inputForm.reportDetail.servedUnitName" placeholder="请填写被服务单位" clearable>
                    <el-button slot="append" :disabled="true" icon="el-icon-search" @click="openWorkClient()"></el-button>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报告类型" prop="reportDetail.reportType"
                              :rules="[
                   ]">
                  <el-select v-model="inputForm.reportDetail.reportType" :disabled="true" placeholder="请选择报告类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_report_title_type')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="所属行业" prop="reportDetail.industry"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.industry" placeholder="请选择所属行业" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_industry')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="业务对象" prop="reportDetail.businessObjects"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.businessObjects" placeholder="请选择业务对象" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_business_objects')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="业务类型" prop="reportDetail.businessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.businessType" @change="changeBusinessType" placeholder="请选择业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_business_type')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="inputForm.reportDetail.businessType === '1'">
                <el-form-item label="审计业务类型" prop="reportDetail.auditBusinessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.auditBusinessType" placeholder="请选择审计业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_audit_business_type1')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="inputForm.reportDetail.businessType === '2'">
                <el-form-item label="审计业务类型" prop="reportDetail.auditBusinessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.auditBusinessType" placeholder="请选择审计业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_audit_business_type2')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="inputForm.reportDetail.businessType === '3'">
                <el-form-item label="审计业务类型" prop="reportDetail.auditBusinessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.auditBusinessType" placeholder="请选择审计业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_audit_business_type3')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="inputForm.reportDetail.businessType === '4'">
                <el-form-item label="审计业务类型" prop="reportDetail.auditBusinessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.auditBusinessType" placeholder="请选择审计业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_audit_business_type4')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="inputForm.reportDetail.businessType === '5'">
                <el-form-item label="审计业务类型" prop="reportDetail.auditBusinessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.auditBusinessType" placeholder="请选择审计业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_audit_business_type5')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12" v-if="inputForm.reportDetail.businessType === '6'">
                <el-form-item label="审计业务类型" prop="reportDetail.auditBusinessType"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.auditBusinessType" placeholder="请选择审计业务类型" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_audit_business_type6')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报告流水号" prop="reportDetail.reportNumber"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.reportNumber" placeholder="自动生成" clearable></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报告文号" prop="reportDetail.reportNo"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.reportNo" placeholder="自动生成" clearable></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="报告日期" prop="reportDetail.reportDate"
                              :rules="[
                   ]">
                  <el-date-picker
                    placement="bottom-start"
                    value-format="YYYY-MM-DD"
                    :disabled="true"
                    v-model="inputForm.reportDetail.reportDate"
                    style="width: 100%"
                    placeholder="选择日期">
                  </el-date-picker>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i> 其他信息</el-divider>
            <el-row  :gutter="15">
              <el-col :span="12">
                <el-form-item label="公司注册地址" prop="reportDetail.registerAddress"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.registerAddress" placeholder="请填写公司注册地址" clearable>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="业务所在地" prop="reportDetail.businessLocation"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.businessLocation" placeholder="请填写业务所在地" clearable>
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="是否数据证券业务" prop="reportDetail.securityBusiness"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.securityBusiness" placeholder="请选择报告类别" style="width:100%;">
                    <el-option
                      v-for="item in $dictUtils.getDictList('cw_report_negotiable')"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                  <!--                  <el-input v-model="inputForm.securityBusiness" placeholder="请填写是否数据证券业务" clearable>-->
                  <!--                  </el-input>-->
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i> 报告审核信息</el-divider>
            <el-row  :gutter="15">
              <el-col :span="12">
                <el-form-item label="下一节点审核人" prop="reportDetail.reviewBy"
                              :rules="[
                   ]">
                  <el-select :disabled="true" v-model="inputForm.reportDetail.reviewBy" placeholder="请选择下一节点审核人" style="width:100%;">
                    <el-option
                      v-for="item in reviewBys"
                      :key="item.index"
                      :label="item.label"
                      :value="item.value">
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="共印份数（大写）" prop="reportDetail.allPrintNum"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.allPrintNum" placeholder="请输入本报告共印份数">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="发出份数（大写）" prop="reportDetail.issueNum"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.issueNum" placeholder="请输入发出份数">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="存档份数（大写）" prop="reportDetail.placeOnFileNum"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.placeOnFileNum" placeholder="请输入发出份数">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="打印人签名" prop="reportDetail.printedBy"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.printedBy" placeholder="请输入打印人签名">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="校对人签名" prop="reportDetail.checkAutograph"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.checkAutograph" placeholder="请输入校对人签名">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="计算机文号" prop="reportDetail.computerNo"
                              :rules="[
                   ]">
                  <el-input :disabled="true" v-model="inputForm.reportDetail.computerNo" placeholder="请输入校对人签名">
                  </el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i>一级复核</el-divider>
            <el-row  :gutter="15" >
              <el-col :span="24">
				  <vxe-table
					  border
					  show-overflow
					  ref="details"
					  class="vxe-table-element"
					  :data="inputForm.reportDetail.detailFor1010"
					  style="margin-left: 5em"
					  keep-source
					  highlight-current-row
					  :key="tableKeyClient"
					  :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
				  >
					  <vxe-table-column field="typeName" title="复核的主要内容" :edit-render="{}">
						  <template v-slot:edit="scope">
							  <el-input :disabled="true"  v-model="scope.row.typeName" ></el-input>
						  </template>
					  </vxe-table-column>
					  <vxe-table-column field="reviewComments" title="复核结果（是/否/不适用）" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
						  <template v-slot:edit="scope">
							  <vxe-select :disabled="true" v-model="scope.row.reviewComments" transfer>
								  <vxe-option
									  v-for="item in $dictUtils.getDictList('yes_no_notApplicable')"
									  :key="item.value"
									  :value="item.value"
									  :label="item.label">
								  </vxe-option>
							  </vxe-select>
						  </template>
					  </vxe-table-column>
				  </vxe-table>
			  </el-col>
              <el-col style="margin-top: 15px">
                <el-form-item label="关注或修改的事项" prop="reportDetail.needUpdate1"
                              :rules="[
                 ]">
                  <el-input :disabled="true" type="textarea" v-model="inputForm.reportDetail.needUpdate1" placeholder="请填写需提请关注或修改的事项"></el-input>
                </el-form-item>
              </el-col>
              <el-col>
                <el-form-item label="备注" prop="reportDetail.remark1"
                              :rules="[
                 ]">
                  <el-input :disabled="true" type="textarea" v-model="inputForm.reportDetail.remark1" placeholder="请填写一级复核备注"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i>二级复核</el-divider>
            <el-row  :gutter="15" >
              <el-col :span="24">
				  <vxe-table
					  border
					  show-overflow
					  ref="details"
					  class="vxe-table-element"
					  :data="inputForm.reportDetail.detailFor1020"
					  style="margin-left: 5em"
					  keep-source
					  highlight-current-row
					  :key="tableKeyClient2"
					  :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
				  >
					  <vxe-table-column field="typeName" title="复核的主要内容" :edit-render="{}">
						  <template v-slot:edit="scope">
							  <el-input :disabled="true" v-model="scope.row.typeName" ></el-input>
						  </template>
					  </vxe-table-column>
					  <vxe-table-column field="reviewComments" title="复核结果（是/否/不适用）" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
						  <template v-slot:edit="scope">
							  <vxe-select :disabled="true" v-model="scope.row.reviewComments" transfer>
								  <vxe-option
									  v-for="item in $dictUtils.getDictList('yes_no_notApplicable')"
									  :key="item.value"
									  :value="item.value"
									  :label="item.label">
								  </vxe-option>
							  </vxe-select>
						  </template>
					  </vxe-table-column>
				  </vxe-table>
			  </el-col>
              <el-col style="margin-top: 15px">
                <el-form-item label="关注或修改的事项" prop="reportDetail.needUpdate2"
                              :rules="[
                 ]">
                  <el-input :disabled="true" type="textarea" v-model="inputForm.reportDetail.needUpdate2" placeholder="请填写二级复核需提请关注或修改的事项"></el-input>
                </el-form-item>
              </el-col>
              <el-col>
                <el-form-item label="备注" prop="reportDetail.remark2"
                              :rules="[
                 ]">
                  <el-input :disabled="true" type="textarea" v-model="inputForm.reportDetail.remark2" placeholder="请填写二级复核备注"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
            <el-divider content-position="left"><i class="el-icon-document"></i>三级复核</el-divider>
            <el-row  :gutter="15" >
              <el-col :span="24">
				  <vxe-table
					  border
					  show-overflow
					  ref="details"
					  class="vxe-table-element"
					  :data="inputForm.reportDetail.detailFor1030"
					  style="margin-left: 5em"
					  keep-source
					  highlight-current-row
					  :key="tableKeyClient3"
					  :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true}"
				  >
					  <vxe-table-column field="typeName" title="复核的主要内容" :edit-render="{}">
						  <template v-slot:edit="scope">
							  <el-input :disabled="true" v-model="scope.row.typeName" ></el-input>
						  </template>
					  </vxe-table-column>
					  <vxe-table-column field="reviewComments" title="复核结果（是/否/不适用）" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}">
						  <template v-slot:edit="scope">
							  <vxe-select :disabled="true" v-model="scope.row.reviewComments" transfer>
								  <vxe-option
									  v-for="item in $dictUtils.getDictList('yes_no_notApplicable')"
									  :key="item.value"
									  :value="item.value"
									  :label="item.label">
								  </vxe-option>
							  </vxe-select>
						  </template>
					  </vxe-table-column>
				  </vxe-table>
			  </el-col>
              <el-col style="margin-top: 15px">
                <el-form-item label="关注或修改的事项" prop="reportDetail.needUpdate3"
                              :rules="[
                 ]">
                  <el-input :disabled="true" type="textarea" v-model="inputForm.reportDetail.needUpdate3" placeholder="请填写三级复核需提请关注或修改的事项"></el-input>
                </el-form-item>
              </el-col>
              <el-col>
                <el-form-item label="备注" prop="reportDetail.remark3"
                              :rules="[
                 ]">
                  <el-input :disabled="true" type="textarea" v-model="inputForm.reportDetail.remark3" placeholder="三级复核备注"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-row>

          <el-row  :gutter="15" style="margin-top: 30px">
            <el-col :span="24">
              <el-form-item label="作废原因" prop="cancellateReason"
                            :rules="[
                              {required: true, message:'作废原因不能为空', trigger:'blur'}
                   ]">
                <el-input type="textarea" v-model="inputForm.cancellateReason" placeholder="请填写作废原因" clearable></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick" style="width: 100%;">

              <el-tab-pane label="附件" name="enclosure">
                <!--        附件-->
                <UpLoadComponent2 ref="enclosure"></UpLoadComponent2>
              </el-tab-pane>
              <el-tab-pane label="签章附件" name="archiveFile">
                <!--        附件-->
                <UpLoadComponent ref="archiveFile" @clickSign="clickSign"></UpLoadComponent>
              </el-tab-pane>
              <el-tab-pane label="已签章附件" name="signatureFile">
                <!--        附件-->
                <UpLoadComponent2 ref="signatureFile"></UpLoadComponent2>
              </el-tab-pane>

            </el-tabs>
          </el-row>

        </el-form>
      </el-col>
    </el-row>

    <ReportCancellApplyChooseCom  ref="reportCancellApplyChooseCom" @getProject="getContract"></ReportCancellApplyChooseCom>
  </div>
</template>

<script>
  import UpLoadComponent2 from '@/views/common/UpLoadComponent'
  import UpLoadComponent from '@/views/common/UpLoadComponentV2.1'
  import SelectTree from '@/components/treeSelect/treeSelect.vue'
  import UserSelect from '../workClientInfo/clientUserSelect'
  import UserSelectAll from '@/components/userSelect'
  // import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
  import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
  import ReportCancellApplyChooseCom from './ReportCancellApplyChooseCom'
  import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
  export default {
    props: {
      businessId: {
        type: String,
        default: ''
      },
      formReadOnly: {
        type: Boolean,
        default: false
      },
      status: {
        type: String,
        default: ''
      }
    },
    data () {
      return {
        title: '',
        method: '',
        loading: false,
        inputForm: {
          projectId: '',
          reportNewLineId: '',
          id: '',
			createTime: '',
          createBy: {
            id: this.$store.state.user.id,
            name: this.$store.state.user.name
          },
          remarks: '',
          reportNo: '',
          projectName: '',
          cancellateReason: '',
          reportSponsor: '',
          projectMasterName: '',
          projectMaster2Name: '',
          cwFileInfoList: [],
          servedUnitId: '',
          status: '',
          reportDetail: {
            reviewBy: '', // 下一个节点审核人
            detailFor1010: [],
            detailFor1020: [],
            detailFor1030: [],
            details: [],
            reportNewLineId: '',
            allPrintNum: '',
            issueNum: '',
            placeOnFileNum: '',
            printedBy: '',
            checkAutograph: '',
            computerNo: '',
            reportTitleType: '',
            needUpdate1: '',
            needUpdate2: '',
            needUpdate3: '',
            remark1: '',
            remark2: '',
            remark3: '',
            projectMasterId1: '',
            reviewStatus: '',
            taskName: '',
            sealType: '',
            reportNumber: '',
            reportType: '',
            businessType: '',
            auditBusinessType: '',
            reportDate: '',
            servedUnitName: '', // 被服务单位
            registerAddress: '',
            securityBusiness: '',
            businessLocation: '',
            auditFees: '',
            userName: '',
            opinionType: '',
            reportNo: '',
            reportReviewNo: '',
            projectId: '',
            id: '',
			  createTime: '',
            createBy: {
              id: '',
              name: ''
            },
            remarks: '',
            documentNo: '',
            projectName: '',
            projectNumber: '',
            officeId: '',
            signatureAnnotator1: '',
            signatureAnnotator2: '',
            signatureType: '',
            projectMasterName: '',
            cwProjectInfoList: [],
            cwFileInfoList: [],
            cwFileInfoList2: [],
            signatureFileList: [],
            servedUnitId: '',
            status: '',
            realCreate: '',
            realHeaderName: '',
            projectMasterId2: '',
            industry: '',
            businessObjects: ''
          }
        },
        keyWatch: '',
        activeName: 'enclosure',
        tableKey: '',
        tableKeyClient: '1',
        tableKeyContact: '2',
        tableKeyClient2: '3',
        tableKeyClient3: '4',
        reviewBys: []
      }
    },
    // ProjectReportService: null,
    ReportCancellApplyService: null,
    ReportReviewService: null,
    created () {
      // this.projectReportService = new ProjectReportService()
      this.reportCancellApplyService = new ReportCancellApplyService()
      this.reportReviewService = new ReportReviewService()
    },
    computed: {
      bus: {
        get () {
          this.$refs.enclosure.setDividerName('附件', false)
          this.$refs.archiveFile.setDividerName('附件', false)
          this.$refs.signatureFile.setDividerName('附件', false)
          return this.businessId
        },
        set (val) {
          this.businessId = val
        }
      }
    },
    watch: {
      'keyWatch': {
        handler (newVal) {
          if (this.commonJS.isNotEmpty(this.bus)) {
            this.init('', this.bus)
          } else {
            this.$nextTick(() => {
              this.$refs.inputForm.resetFields()
            })
          }
        }
      },
      'loading': {
        handler (newVal) {
          this.$emit('changeLoading', newVal)
        }
      }
    },
    components: {
      UpLoadComponent,
      SelectTree,
      UserSelect,
      ReportCancellApplyChooseCom,
      UserSelectAll,
      UpLoadComponent2
    },
    methods: {
      getKeyWatch (keyWatch) {
        this.keyWatch = keyWatch
      },
      init (method, id) {
        this.activeName = 'enclosure'
        // this.projectReportService = new ProjectReportService()
        this.reportCancellApplyService = new ReportCancellApplyService()
        this.method = method
        this.inputForm = {
          projectId: '',
          reportNewLineId: '',
          id: '',
			createTime: '',
          createBy: {
            id: this.$store.state.user.id,
            name: this.$store.state.user.name
          },
          remarks: '',
          reportNo: '',
          projectName: '',
          cancellateReason: '',
          reportSponsor: '',
          projectMasterName: '',
          projectMaster2Name: '',
          reportDetail: {
            reviewBy: '', // 下一个节点审核人
            detailFor1010: [],
            detailFor1020: [],
            detailFor1030: [],
            details: [],
            reportNewLineId: '',
            allPrintNum: '',
            issueNum: '',
            placeOnFileNum: '',
            printedBy: '',
            checkAutograph: '',
            computerNo: '',
            reportTitleType: '',
            needUpdate1: '',
            needUpdate2: '',
            needUpdate3: '',
            remark1: '',
            remark2: '',
            remark3: '',
            projectMasterId1: '',
            reviewStatus: '',
            taskName: '',
            sealType: '',
            reportNumber: '',
            reportType: '',
            businessType: '',
            auditBusinessType: '',
            reportDate: '',
            servedUnitName: '', // 被服务单位
            registerAddress: '',
            securityBusiness: '',
            businessLocation: '',
            auditFees: '',
            userName: '',
            opinionType: '',
            reportNo: '',
            reportReviewNo: '',
            projectId: '',
            id: '',
			  createTime: '',
            createBy: {
              id: '',
              name: ''
            },
            remarks: '',
            documentNo: '',
            projectName: '',
            projectNumber: '',
            officeId: '',
            signatureAnnotator1: '',
            signatureAnnotator2: '',
            signatureType: '',
            projectMasterName: '',
            cwProjectInfoList: [],
            cwFileInfoList: [],
            cwFileInfoList2: [],
            signatureFileList: [],
            servedUnitId: '',
            status: '',
            realCreate: '',
            realHeaderName: '',
            projectMasterId2: '',
            industry: '',
            businessObjects: ''
          }
        }
        this.inputForm.id = id
        this.loading = false
        this.reviewBys = []
        this.$nextTick(() => {
          this.$refs.enclosure.clearUpload()
          this.$refs.archiveFile.clearUpload()
          this.$refs.signatureFile.clearUpload()
          this.$refs.inputForm.resetFields()
          this.loading = true
          this.reportCancellApplyService.queryById(this.inputForm.id).then((data) => {
            this.inputForm = this.recover(this.inputForm, data)
            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
            if (this.commonJS.isNotEmpty(data.reportDetail)) {
              if (this.commonJS.isNotEmpty(data.reportDetail.reviewBys)) {
                if (data.reportDetail.reviewBys) {
                  data.reportDetail.reviewBys.forEach(re => {
                    let va = {
                      label: re.name,
                      value: re.sysUserId
                    }
                    this.reviewBys.push(va)
                  })
                }
              }
              if (this.commonJS.isEmpty(data.reportDetail.details)) {
                this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
              } else {
                this.detailDivide(data.reportDetail.details)
              }
              if (this.commonJS.isEmpty(this.inputForm.reportDetail.signatureType) && this.method !== 'view') {
                this.inputForm.reportDetail.signatureType = '1'
              }
              if (this.commonJS.isNotEmpty(data.reportDetail.cwWorkClientContactDTOList)) {
                this.inputForm.reportDetail.cwWorkClientContactDTOList = data.reportDetail.cwWorkClientContactDTOList
              } else {
                this.inputForm.reportDetail.cwWorkClientContactDTOList = []
              }
              this.$refs.enclosure.newUpload('view', data.reportDetail.cwFileInfoList2, 'cwWorkContract', null, null, null, null, false)
              this.$refs.archiveFile.newUpload('view', data.reportDetail.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
              this.$refs.signatureFile.newUpload('view', data.reportDetail.signatureFileList, 'cwWorkContract', null, null, null, null, false)
            } else {
              this.reviewBys = []
              this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
              this.$refs.enclosure.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
              this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
              this.$refs.signatureFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
            }
            this.loading = false
          })
        })
      },
      openContractForm () {
        if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
          this.$refs.reportCancellApplyChooseCom.init()
        } else {
          this.$refs.reportCancellApplyChooseCom.init()
        }
      },
      getContract (row) {
      	console.log('row', row)
        this.inputForm.reportNo = row.reportNo // 报告文号
        this.inputForm.reportNewLineId = row.reportNewLineId // 新建行id
        this.inputForm.projectId = row.id // 项目id
        this.inputForm.reportDetail = {
          reviewBy: '', // 下一个节点审核人
          detailFor1010: [],
          detailFor1020: [],
          detailFor1030: [],
          details: [],
          reportNewLineId: '',
          allPrintNum: '',
          issueNum: '',
          placeOnFileNum: '',
          printedBy: '',
          checkAutograph: '',
          computerNo: '',
          reportTitleType: '',
          needUpdate1: '',
          needUpdate2: '',
          needUpdate3: '',
          remark1: '',
          remark2: '',
          remark3: '',
          projectMasterId1: '',
          reviewStatus: '',
          taskName: '',
          sealType: '',
          reportNumber: '',
          reportType: '',
          businessType: '',
          auditBusinessType: '',
          reportDate: '',
          servedUnitName: '', // 被服务单位
          registerAddress: '',
          securityBusiness: '',
          businessLocation: '',
          auditFees: '',
          userName: '',
          opinionType: '',
          reportNo: '',
          reportReviewNo: '',
          projectId: '',
          id: '',
			createTime: '',
          createBy: {
            id: '',
            name: ''
          },
          remarks: '',
          documentNo: '',
          projectName: '',
          projectNumber: '',
          officeId: '',
          signatureAnnotator1: '',
          signatureAnnotator2: '',
          signatureType: '',
          projectMasterName: '',
          cwProjectInfoList: [],
          cwFileInfoList: [],
          cwFileInfoList2: [],
          signatureFileList: [],
          servedUnitId: '',
          status: '',
          realCreate: '',
          realHeaderName: '',
          projectMasterId2: '',
          industry: '',
          businessObjects: ''
        }
        this.reviewBys = []
        if (this.commonJS.isNotEmpty(row.reportNo)) {
          this.loading = true
          this.reportCancellApplyService.queryByNo(row.reportNo).then((data) => {
            console.log(data.reviewBys)
            if (this.commonJS.isNotEmpty(data)) {
              this.inputForm.reportDetail = this.recover(this.inputForm.reportDetail, data)
              this.inputForm.reportDetail = JSON.parse(JSON.stringify(this.inputForm.reportDetail))
              if (this.commonJS.isNotEmpty(data.reviewBys)) {
                if (data.reviewBys) {
                  data.reviewBys.forEach(re => {
                    let va = {
                      label: re.name,
                      value: re.sysUserId
                    }
                    this.reviewBys.push(va)
                  })
                }
              }
              if (this.commonJS.isEmpty(data.details)) {
                this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
              } else {
                this.detailDivide(data.details)
              }
              if (this.commonJS.isEmpty(this.inputForm.reportDetail.signatureType) && this.method !== 'view') {
                this.inputForm.reportDetail.signatureType = '1'
              }
              if (this.commonJS.isNotEmpty(data.cwWorkClientContactDTOList)) {
                this.inputForm.reportDetail.cwWorkClientContactDTOList = data.cwWorkClientContactDTOList
              } else {
                this.inputForm.reportDetail.cwWorkClientContactDTOList = []
              }
              this.$refs.enclosure.newUpload('view', data.cwFileInfoList2, 'cwWorkContract', null, null, null, null, false)
              this.$refs.archiveFile.newUpload('view', data.cwFileInfoList, 'cwWorkContract', null, null, null, null, false)
              this.$refs.signatureFile.newUpload('view', data.signatureFileList, 'cwWorkContract', null, null, null, null, false)
            } else {
              this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
              this.$refs.enclosure.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
              this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
              this.$refs.signatureFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
            }
            this.loading = false
          }).catch(() => {
            this.loading = false
          })
        }
        this.$forceUpdate()
      },
      clearClientList () {
        // 项目直接对接联系人列表清除
        this.inputForm.clientList = []
        this.$forceUpdate()
      },
      saveForm (callback) {
        this.doSubmit('save', callback)
      },
      startForm (callback) {
        this.loading = true
        if (this.commonJS.isNotEmpty(this.inputForm.id)) {
          this.reportCancellApplyService.queryById(this.inputForm.id).then((data) => {
            if (data.status !== '0' && data.status !== '1' && data.status !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”，就弹出提示
              this.loading = false
              this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
              throw new Error()
            } else {
              this.doSubmit('start', callback)
            }
          })
        } else {
          this.doSubmit('start', callback)
        }
      },
      async agreeForm (callback) {
        this.loading = true
        await this.reportCancellApplyService.queryById(this.inputForm.id).then((data) => {
          if (data.status !== '2') { // 审核状态不是“待审核”，就弹出提示
            this.loading = false
            this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
            throw new Error()
          } else {
            this.doSubmit('agree', callback)
          }
        })
        // await this.projectReportService.queryById(this.inputForm.id).then((data) => {
        //   console.log('进来了看看data', data)
        //   if (data.status !== '2') { // 审核状态不是“待审核”，就弹出提示
        //     this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
        //     throw new Error()
        //   } else {
        //     this.doSubmit('agree', callback)
        //   }
        // })
      },
      reapplyForm (callback) {
        this.loading = true
        this.reportCancellApplyService.queryById(this.inputForm.id).then((data) => {
          if (data.status !== '4') { // 审核状态不是“驳回”，就弹出提示
            this.loading = false
            this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
            throw new Error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
          } else {
            this.doSubmit('reapply', callback)
          }
        })
      },
      // 表单提交
      doSubmit (status, callback) {
        if (status === 'save') {
          // 暂存
          this.inputForm.status = '1'
          this.loading = true
          this.inputForm.createTime = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
          // 验证报告 日期报告 类型是否出具报告 意见类型 是否为空
          // eslint-disable-next-line no-unused-expressions
          this.reportCancellApplyService.saveForm(this.inputForm).then((data) => {
            callback(data.businessTable, data.businessId, this.inputForm)
            this.loading = false
          }).catch(() => {
            this.loading = false
          })
          // this.projectReportService.saveForm(this.inputForm).then((data) => {
          //   callback(data.businessTable, data.businessId, this.inputForm)
          //   this.loading = false
          // }).catch(() => {
          //   this.loading = false
          // })
          return
        } else if (status === 'start') {
          // 送审  待审核
          this.inputForm.status = '2'
        } else if (status === 'agree') {
          // 审核同意
          this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
          this.inputForm.agreeUserId = this.$store.state.user.id
          this.inputForm.status = '5'
        } else if (status === 'reapply') {
          this.inputForm.status = '2'
        }
        if (this.commonJS.isEmpty(this.inputForm.cancellateReason)) {
          this.$message.error('请填写作废原因')
          this.loading = false
          throw new Error('请填写作废原因')
        }
        this.$refs['inputForm'].validate((valid) => {
          if (valid) {
            this.loading = true
            // if (this.commonJS.isEmpty(this.inputForm.createTime)) {
            //   this.inputForm.createTime = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
            // }
            this.reportCancellApplyService.saveForm(this.inputForm).then((data) => {
              if (status === 'start' || status === 'reapply') {
                this.inputForm.assignee = this.inputForm.reportDetail.reviewBy
                this.inputForm.title = `${this.$store.state.user.name} 发起了 [${this.inputForm.reportNo}] - ${this.inputForm.projectName} [财务-报告作废]`
              }
              this.inputForm.id = data.businessId
              callback(data.businessTable, data.businessId, this.inputForm)
              this.loading = false
            }).catch(() => {
              this.loading = false
            })
            // this.projectReportService.saveForm(this.inputForm).then((data) => {
            //   console.log('businessTable', data.businessTable)
            //   console.log('businessId', data.businessId)
            //   callback(data.businessTable, data.businessId, this.inputForm)
            //   this.loading = false
            // }).catch(() => {
            //   this.loading = false
            // })
          } else {
            this.loading = false
          }
        })
      },
      async updateStatusById (type, callback) {
        this.loading = true
        if (type === 'reject' || type === 'reback') {
          await this.reportCancellApplyService.queryById(this.inputForm.id).then((data) => {
            if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
              this.loading = false
              this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
              throw new Error()
            } else {
              if (type === 'reject') {
                // 驳回
                this.inputForm.status = '4'
                let param = {status: '4', id: this.inputForm.id}
                this.reportCancellApplyService.updateStatusById(param).then(() => {
                  this.loading = false
                  callback()
                })
              }
              if (type === 'reback') {
                // 撤回
                let param = {status: '3', id: this.inputForm.id}
                this.reportCancellApplyService.updateStatusById(param).then(() => {
                  this.loading = false
                  callback()
                })
              }
            }
          })
        } else if (type === 'hold') {
          this.reportCancellApplyService.queryById(this.inputForm.id).then((data) => {
            if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
              this.loading = false
              this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
              throw new Error()
            } else {
              // 终止
              let param = {status: '1', id: this.inputForm.id}
              this.reportCancellApplyService.updateStatusById(param).then(() => {
                this.loading = false
                callback()
              })
            }
          })
        }
      },
      close () {
        this.reviewBys = []
        // this.inputForm = {
        //   id: '',
		// 	createTime: '',
        //   createBy: {
        //     id: '',
        //     name: this.$store.state.user.name
        //   },
        //   remarks: '',
        //   reportNo: '',
        //   projectName: '',
        //   cancellateReason: '',
        //   reportSponsor: '',
        //   projectMasterName: '',
        //   projectMaster2Name: '',
        //   reportDetail: {
        //     reviewBy: '', // 下一个节点审核人
        //     detailFor1010: [],
        //     detailFor1020: [],
        //     detailFor1030: [],
        //     details: [],
        //     reportNewLineId: '',
        //     allPrintNum: '',
        //     issueNum: '',
        //     placeOnFileNum: '',
        //     printedBy: '',
        //     checkAutograph: '',
        //     computerNo: '',
        //     reportTitleType: '',
        //     needUpdate1: '',
        //     needUpdate2: '',
        //     needUpdate3: '',
        //     remark1: '',
        //     remark2: '',
        //     remark3: '',
        //     projectMasterId1: '',
        //     reviewStatus: '',
        //     taskName: '',
        //     sealType: '',
        //     reportNumber: '',
        //     reportType: '',
        //     businessType: '',
        //     auditBusinessType: '',
        //     reportDate: '',
        //     servedUnitName: '', // 被服务单位
        //     registerAddress: '',
        //     securityBusiness: '',
        //     businessLocation: '',
        //     auditFees: '',
        //     userName: '',
        //     opinionType: '',
        //     reportNo: '',
        //     reportReviewNo: '',
        //     projectId: '',
        //     id: '',
		// 	  createTime: '',
        //     createBy: {
        //       id: '',
        //       name: ''
        //     },
        //     remarks: '',
        //     documentNo: '',
        //     projectName: '',
        //     projectNumber: '',
        //     officeId: '',
        //     signatureAnnotator1: '',
        //     signatureAnnotator2: '',
        //     signatureType: '',
        //     projectMasterName: '',
        //     cwProjectInfoList: [],
        //     cwFileInfoList: [],
        //     cwFileInfoList2: [],
        //     signatureFileList: [],
        //     servedUnitId: '',
        //     status: '',
        //     realCreate: '',
        //     realHeaderName: '',
        //     projectMasterId2: '',
        //     industry: '',
        //     businessObjects: ''
        //   }
        // }
        // this.$refs.uploadComponent.clearUpload()
        this.$refs.inputForm.resetFields()
      },
      tabHandleClick (event) {
        // console.log(event)
      },
      // 删除
      removeEvent (row, rowIndex, type) {
        if (type === 'client') {
          this.$refs.clientTable.remove(row)
        }
      },
      detailDivide (details) {
        this.inputForm.reportDetail.detailFor1010 = []
        this.inputForm.reportDetail.detailFor1020 = []
        this.inputForm.reportDetail.detailFor1030 = []
        details.forEach(item => {
          if (item.sort.toString().startsWith('1010')) {
            this.inputForm.reportDetail.detailFor1010.push(item)
            this.tableKeyClient = Math.random()
          }
          if (item.sort.toString().startsWith('1020')) {
            this.inputForm.reportDetail.detailFor1020.push(item)
            this.tableKeyClient2 = Math.random()
          }
          if (item.sort.toString().startsWith('1030')) {
            this.inputForm.reportDetail.detailFor1030.push(item)
            this.tableKeyClient3 = Math.random()
          }
        })
      },
      changeBusinessType () {
        // 切换业务类型的时候，审计业务类型清空
        this.inputForm.auditBusinessType = ''
      },
      clickSign () {
        this.projectReportService.saveFlowableParam(this.inputForm).then((data) => {
          window.open(data, '_blank')
        })
      }
    }
  }
</script>
<style scoped>
  /deep/ .el-input-number .el-input__inner {
    text-align: left;
  }
</style>
