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

        <el-form :model="inputForm" ref="inputForm2" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
                 label-width="135px" @submit.native.prevent>
          <el-divider content-position="left"><i class="el-icon-document"></i> 项目信息</el-divider>
          <el-row  :gutter="0">
            <el-col :span="12">
              <el-form-item label="项目名称" prop="projectName"
                            :rules="[
                   ]">
                <!--                <el-input v-model="inputForm.projectName" placeholder="请填写项目名称" clearable></el-input>-->
                <el-input @focus="openContractForm()" v-model="inputForm.projectName" placeholder="请选择项目名称">
                  <el-button slot="append"  icon="el-icon-search" @click="openContractForm()"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="项目编号" prop="projectNumber"
                            :rules="[
                   ]">
                <el-input :disabled="true" v-model="inputForm.projectNumber" placeholder="请填写项目编号" clearable></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="项目经理1" prop="projectMasterName"
                            :rules="[
                   ]">
                <el-input :disabled="true" v-model="inputForm.projectMasterName" placeholder="请填写项目经理1" clearable></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="项目经理2" prop="realHeaderName"
                            :rules="[
                   ]">
                <el-input :disabled="true" v-model="inputForm.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="0">
            <el-col :span="12">
              <el-form-item label="单据编号" prop="documentNo"
                            :rules="[

                   ]">
                <el-input :disabled="true" v-model="inputForm.documentNo" placeholder="自动生成" clearable></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="报告所属部门" prop="officeId"
                            :rules="[
                   ]">
                <SelectTree
                  ref="officeTree"
                  :props="{
                  value: 'id',             // ID字段名
                  label: 'name',         // 显示名称
                  children: 'children'    // 子级字段名
                }"
				  size="default"
                  :url="`/system-server/sys/office/treeData?type=2`"
                  :value="inputForm.officeId"
                  :accordion="true"
                  @getValue="(value) => {inputForm.officeId=value}"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="盖章类型" prop="signatureType"
                            :rules="[
                            /*{required: true, message: '盖章类型不能为空', trigger: 'change'}*/
                   ]">
                <!--                <el-input v-model="inputForm.signatureType" placeholder="请填写盖章类型" clearable></el-input>-->
                <el-select  v-model="inputForm.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.signatureType === '1'|| inputForm.signatureType === '3' || commonJS.isEmpty(inputForm.signatureType)" :span="12">
              <el-form-item label="签字注师1" prop="signatureAnnotator1"
                            :rules="[
                   ]">
                <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
                <UserSelect style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
              </el-form-item>
            </el-col>

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

            <el-col v-if="inputForm.signatureType === '2'" :span="12">
              <el-form-item label="签字注师1" prop="signatureAnnotator1"
                            :rules="[
                   ]">
                <!--                <el-input v-model="inputForm.signatureAnnotator1" placeholder="请填写签字注师1" clearable></el-input>-->
                <UserSelect style="width: 100%" ref="userSelect1" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator1" @update:modelValue='(value) => {changeSignatory1(value)}'></UserSelect>
              </el-form-item>
            </el-col>

            <el-col v-if="inputForm.signatureType === '2'" :span="12">
              <el-form-item label="签字注师2" prop="signatureAnnotator2"
                            :rules="[
                   ]">
                <!--                <el-input v-model="inputForm.signatureAnnotator2" placeholder="请填写签字注师2" clearable></el-input>-->
                <UserSelect2 style="width: 100%" ref="userSelect2" :disabled="status === 'audit' || status === 'taskFormDetail'" :readonly="true" :limit='1' :modelValue="inputForm.signatureAnnotator2" @update:modelValue='(value) => {changeSignatory2(value)}'></UserSelect2>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="审计意见类型" prop="opinionType"
                            :rules="[
                     ]">
                <el-select  v-model="inputForm.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="auditFees"
                            :rules="[
                   ]">
                <el-input  v-model="inputForm.auditFees" placeholder="请填写审计收费(税前、元)" clearable
                          @keyup.native="inputForm.auditFees = twoDecimalPlaces(inputForm.auditFees)"
                ></el-input>
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="报告实际制作人" prop="realCreate"
                            :rules="[
                   ]">
                <UserSelectAll :readonly="true" :disabled="status === 'audit' || status === 'taskFormDetail'" :limit='1' :modelValue="inputForm.realCreate" @update:modelValue='(value) => {inputForm.realCreate = value}'></UserSelectAll>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="创建时间" prop="createDate"
                            :rules="[
                   ]">
                <el-input :disabled="true" v-model="inputForm.createDate" 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="0">
            <el-col :span="12">
              <el-form-item label="被服务单位" prop="servedUnitName"
                            :rules="[
                   ]">
                <el-input  @focus="openWorkClient()" v-model="inputForm.servedUnitName" placeholder="请填写被服务单位" clearable>
                  <el-button slot="append" icon="el-icon-search" @click="openWorkClient()"></el-button>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="报告类型" prop="reportType"
                            :rules="[
                   ]">
                <el-select  v-model="inputForm.reportType" 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="industry"
                            :rules="[
                            {required: true, message:'所属行业不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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="businessObjects"
                            :rules="[
                            {required: true, message:'业务对象不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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="businessType"
                            :rules="[
                            {required: true, message:'业务类型不能为空', trigger:'change'}
                   ]">
                <el-select @change="changeBusinessType" v-model="inputForm.businessType" 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.businessType === '1'">
              <el-form-item label="审计业务类型" prop="auditBusinessType"
                            :rules="[
                            {required: true, message:'审计业务类型不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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.businessType === '2'">
              <el-form-item label="审计业务类型" prop="auditBusinessType"
                            :rules="[
                            {required: true, message:'审计业务类型不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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.businessType === '3'">
              <el-form-item label="审计业务类型" prop="auditBusinessType"
                            :rules="[
                            {required: true, message:'审计业务类型不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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.businessType === '4'">
              <el-form-item label="审计业务类型" prop="auditBusinessType"
                            :rules="[
                            {required: true, message:'审计业务类型不能为空', trigger:'change'}
                   ]">
                <el-select  v-model="inputForm.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.businessType === '5'">
              <el-form-item label="审计业务类型" prop="auditBusinessType"
                            :rules="[
                            {required: true, message:'审计业务类型不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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.businessType === '6'">
              <el-form-item label="审计业务类型" prop="auditBusinessType"
                            :rules="[
                            {required: true, message:'审计业务类型不能为空', trigger:'change'}
                   ]">
                <el-select v-model="inputForm.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="reportNumber"
                            :rules="[
                   ]">
                <el-input :disabled="true" v-model="inputForm.reportNumber" placeholder="自动生成" clearable></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="报告文号" prop="reportNo"
                            :rules="[
                   ]">
                <el-input :disabled="true" v-model="inputForm.reportNo" placeholder="自动生成" clearable></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="报告日期" prop="reportDate"
                            :rules="[
                   ]">
                <el-date-picker
                  placement="bottom-start"
                  value-format="YYYY-MM-DD"
                  v-model="inputForm.reportDate"
                  style="width: 100%"
                  placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
            </el-col>
<!--            <el-col :span="12">-->
<!--              <el-form-item label="盖章状态" prop="sealType"-->
<!--                            :rules="[-->
<!--                   ]">-->
<!--                <el-input :disabled="true" v-model="inputForm.sealType" 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="0">
            <el-col :span="12">
              <el-form-item label="公司注册地址" prop="registerAddress"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.registerAddress" placeholder="请填写公司注册地址" clearable>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="业务所在地" prop="businessLocation"
                            :rules="[]">
                <el-input v-model="inputForm.businessLocation" placeholder="请填写业务所在地" clearable>
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="是否数据证券业务" prop="securityBusiness"
                            :rules="[
                   ]">
                <el-select v-model="inputForm.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 :disabled="true" 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="reviewBy"
                            :rules="[
                              {required: true, message:'下一节点审核人不能为空', trigger:'blur'}
                   ]">
                <el-select v-model="inputForm.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="reportReviewNo"
                            :rules="[
                   ]">
                <el-input  :disabled="true" v-model="inputForm.reportReviewNo" placeholder="自动生成">
&lt;!&ndash;                  <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>&ndash;&gt;
                </el-input>
              </el-form-item>
            </el-col>-->
            <el-col :span="12">
              <el-form-item label="共印份数（大写）" prop="allPrintNum"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.allPrintNum" placeholder="请输入本报告共印份数">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="发出份数（大写）" prop="issueNum"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.issueNum" placeholder="请输入发出份数">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="存档份数（大写）" prop="placeOnFileNum"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.placeOnFileNum" placeholder="请输入存档份数">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="打印人签名" prop="printedBy"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.printedBy" placeholder="请输入打印人签名">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="校对人签名" prop="checkAutograph"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.checkAutograph" placeholder="请输入校对人签名">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="计算机文号" prop="computerNo"
                            :rules="[
                   ]">
                <el-input v-model="inputForm.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" >
            <vxe-table
              border
              show-overflow
              ref="details"
              class="vxe-table-element"
              :data="inputForm.detailFor1010"
              style="margin-left: 5em;width: 100%"
			  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="{}" align="left">
                <template v-slot:edit="scope">
                  <el-input :disabled="true"  v-model="scope.row.typeName" ></el-input>
                </template>
              </vxe-table-column>
				<vxe-colgroup title="复核结果（是/否/不适用)" align="left">
					<vxe-column    width="30%" field="reviewComments" title="复核结果（是/否/不适用）"
								   :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}"
								   align="left">
							<template #header>
								<div style="float: right;width: 94%" >
									<vxe-select v-model="inputForm.reviewComments0" placeholder="一键添加"  transfer @change="changeValue" :disabled="inputForm.taskName === '二级复核' || inputForm.taskName === '三级复核'|| status === 'taskFormDetail'">
										<vxe-option
											v-for="item in $dictUtils.getDictList('yes_no_notApplicable')"
											:key="item.value"
											:value="item.value"
											:label="item.label">
										</vxe-option>
									</vxe-select>
								</div>
							</template>
						<template v-slot:edit="scope">
							<vxe-select :disabled="inputForm.taskName === '二级复核' || inputForm.taskName === '三级复核'|| status === 'taskFormDetail'" 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-column>
				</vxe-colgroup>
            </vxe-table>
            <el-col style="margin-top: 15px">
              <el-form-item label="关注或修改的事项" prop="needUpdate1"
                            :rules="[
                   ]">
                <el-input type="textarea" v-model="inputForm.needUpdate1" placeholder="请填写需提请关注或修改的事项"></el-input>
              </el-form-item>
            </el-col>
            <el-col>
              <el-form-item label="备注" prop="remark1"
                            :rules="[
                   ]">
                <el-input type="textarea" v-model="inputForm.remark1" placeholder="请填写一级复核备注"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" v-if="this.inputForm.taskName === '二级复核' || this.inputForm.reviewStatus === '5'
                      || this.inputForm.taskName === '三级复核' || this.inputForm.reviewStatus === '4'|| status === 'taskFormDetail'"
                   label-width="135px" @submit.native.prevent>
            <el-divider content-position="left"><i class="el-icon-document"></i>二级复核</el-divider>
            <el-row :gutter="15" >
              <vxe-table
                border
                show-overflow
                ref="details"
                class="vxe-table-element"
                :data="inputForm.detailFor1020"
                style="margin-left: 5em;width: 100%"
				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="{}" align="left">
                  <template v-slot:edit="scope">
                    <el-input :disabled="true" v-model="scope.row.typeName" ></el-input>
                  </template>
                </vxe-table-column>
			  <vxe-colgroup title="复核结果（是/否/不适用)" align="left"  >
                <vxe-table-column width="30%" field="reviewComments" title="复核结果（是/否/不适用）" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}" align="left">
					<template #header>
						<div style="float: right;width: 94%">
						<vxe-select v-model="inputForm.reviewComments1" placeholder="一键添加"  transfer @change="changeValue1" :disabled="inputForm.reviewStatus === '4' || inputForm.taskName === '三级复核'|| status === 'taskFormDetail'">
							<vxe-option
								v-for="item in $dictUtils.getDictList('yes_no_notApplicable')"
								:key="item.value"
								:value="item.value"
								:label="item.label">
							</vxe-option>
						</vxe-select>
						</div>
					</template>
					<template v-slot:edit="scope">
                    <vxe-select :disabled="inputForm.reviewStatus === '4' || inputForm.taskName === '三级复核'|| status === 'taskFormDetail'" 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-colgroup>
              </vxe-table>
              <el-col style="margin-top: 15px">
                <el-form-item label="关注或修改的事项" prop="needUpdate2"
                              :rules="[
                   ]">
                  <el-input :disabled="inputForm.taskName === '三级复核'" type="textarea" v-model="inputForm.needUpdate2" placeholder="请填写二级复核需提请关注或修改的事项"></el-input>
                </el-form-item>
              </el-col>
              <el-col>
                <el-form-item label="备注" prop="remark2"
                              :rules="[
                   ]">
                  <el-input :disabled="inputForm.taskName === '三级复核'"  type="textarea" v-model="inputForm.remark2" placeholder="请填写二级复核备注"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
          <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" v-if="this.inputForm.taskName === '三级复核'  || this.inputForm.reviewStatus === '5'"
                   label-width="135px" @submit.native.prevent>
            <el-divider content-position="left"><i class="el-icon-document"></i>三级复核</el-divider>
            <el-row :gutter="15" >
              <vxe-table
                border
                show-overflow
                ref="details"
                class="vxe-table-element"
                :data="inputForm.detailFor1030"
                style="margin-left: 5em;width: 100%"
				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="{}" align="left">
                  <template v-slot:edit="scope">
                    <el-input :disabled="true" v-model="scope.row.typeName" ></el-input>
                  </template>
                </vxe-table-column>
			  <vxe-colgroup title="复核结果（是/否/不适用)" align="left"  >
                <vxe-table-column width="30%" field="reviewComments" title="复核结果（是/否/不适用）" :edit-render="{name: '$select', options: $dictUtils.getDictList('yes_no_notApplicable')}" align="left">
					<template #header>
						<div style="float: right;width: 94%">
						<vxe-select v-model="inputForm.reviewComments2" placeholder="一键添加"  transfer @change="changeValue2" :disabled="inputForm.taskName === '一级复核' || inputForm.reviewStatus === '4'|| status === 'taskFormDetail'">
							<vxe-option
								v-for="item in $dictUtils.getDictList('yes_no_notApplicable')"
								:key="item.value"
								:value="item.value"
								:label="item.label">
							</vxe-option>
						</vxe-select>
						</div>
					</template>
					<template v-slot:edit="scope">
                    <vxe-select :disabled="inputForm.taskName === '一级复核' || inputForm.reviewStatus === '4'|| status === 'taskFormDetail'" 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-colgroup>
              </vxe-table>
              <el-col style="margin-top: 15px">
                <el-form-item label="关注或修改的事项" prop="needUpdate3"
                              :rules="[
                   ]">
                  <el-input type="textarea" v-model="inputForm.needUpdate3" placeholder="请填写三级复核需提请关注或修改的事项"></el-input>
                </el-form-item>
              </el-col>
              <el-col>
                <el-form-item label="备注" prop="remark3"
                              :rules="[
                   ]">
                  <el-input type="textarea" v-model="inputForm.remark3" placeholder="三级复核备注"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </el-form>
        <el-tabs v-model="activeName" type="border-card" @tab-click="tabHandleClick">
          <el-tab-pane label="附件" name="enclosure">
            <!--        附件-->
            <UpLoadComponent ref="enclosure"></UpLoadComponent>
          </el-tab-pane>
          <el-tab-pane label="签章文件" name="archiveFile">
            <!--        签章文件-->
            <UpLoadComponent ref="archiveFile"></UpLoadComponent>
          </el-tab-pane>
          <el-tab-pane label="已签章附件" name="signatureFile">
            <!--        附件-->
            <UpLoadComponent ref="signatureFile"></UpLoadComponent>
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
    <ProjectRecoredChooseCom  ref="projectRecoredChooseCom" @getProject="getContract"></ProjectRecoredChooseCom>
    <ReportServiceUnitForm ref="reportServiceUnitForm" @getWorkClientChoose="getWorkClientChoose"></ReportServiceUnitForm>
    <!--    <ReportCancellApplyChooseCom  ref="reportCancellApplyChooseCom" @getProject="getContract"></ReportCancellApplyChooseCom>-->
  </div>
</template>

<script>
  import ProjectRecoredChooseCom from '../../projectRecords/ProjectRecordsChooseCom'
  import ReportServiceUnitForm from '../ReportServiceUnitForm'
  import UpLoadComponent from '@/views/common/UpLoadComponent'
  // import UpLoadComponent from '@/views/common/UpLoadComponentV2.1'
  import SelectTree from '@/components/treeSelect/treeSelect.vue'
  import UserSelect from '../../workClientInfo/clientUserSelect/AccountantUserIndex'
  import UserSelect2 from '../../workClientInfo/clientUserSelect/AccountantUserIndex2'
  import UserSelectAll from '@/components/userSelect'
  import ReportCancellApplyService from '@/api/cw/reportCancellApply/ReportCancellApplyService'
  import ReportReviewService from '@/api/cw/reportManagement/ReportReviewService'
  import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
  import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
  import CommonApi from '@/api/cw/common/CommonApi'
  import userService from "@/api/sys/userService";
  export default {
    props: {
      businessId: {
        type: String,
        default: ''
      },
      formReadOnly: {
        type: Boolean,
        default: false
      },
      status: {
        type: String,
        default: ''
      }
    },
    data () {
      return {
        title: '',
        method: '',
        loading: false,
        reviewBys: [],
        inputForm: {
          cwFileInfoList2: [],
          sealType: '',
          reviewBy: '', // 下一个节点审核人
          reportNumber: '',
          reportType: '',
          businessType: '',
          auditBusinessType: '',
          reportDate: '',
          servedUnitName: '', // 被服务单位
          registerAddress: '',
          securityBusiness: '',
          businessLocation: '',
          auditFees: '',
          documentNo: '',
          projectName: '',
          projectNumber: '',
          officeId: '',
          signatureAnnotator1: '',
          signatureAnnotator2: '',
          signatureType: '',
          projectMasterName: '',
          cwProjectInfoList: [],
          status: '',
          realCreate: '',
          userName: '',
          detailFor1010: [],
          detailFor1020: [],
          detailFor1030: [],
          details: [],
          projectId: '',
          reportNewLineId: '',
          id: '',
          createDate: '',
          createBy: {
            id: '',
            name: ''
          },
          remarks: '',
          reportNo: '',
          reportReviewNo: '',
          allPrintNum: '',
          issueNum: '',
          placeOnFileNum: '',
          printedBy: '',
          checkAutograph: '',
          computerNo: '',
          reportTitleType: '',
          needUpdate1: '',
          needUpdate2: '',
          needUpdate3: '',
          remark1: '',
          remark2: '',
          remark3: '',
          opinionType: '',
          cwFileInfoList: [],
          servedUnitId: '',
          reviewStatus: '',
          taskName: '',
          realHeaderName: '',
          projectMasterId1: '',
          projectMasterId2: '',
          industry: '',
          businessObjects: '',
		  reviewComments0:'',
		  reviewComments1:'',
		  reviewComments2:'',
        },
        keyWatch: '',
        activeName: 'enclosure',
        tableKey: '',
        tableKeyClient: '1',
        tableKeyClient2: '1',
        tableKeyClient3: '1'
      }
    },
    ReportCancellApplyService: null,
    ReportReviewService: null,
    enterpriseSearchService: null,
    commonApi: null,
    created () {
      this.enterpriseSearchService = new EnterpriseSearchService()
      this.reportCancellApplyService = new ReportCancellApplyService()
      this.reportReviewService = new ReportReviewService()
      this.commonApi = new CommonApi()
    },
    computed: {
      bus: {
        get () {
          this.$refs.enclosure.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)
          this.$refs.signatureFile.changeLoading(newVal)
          this.$refs.archiveFile.changeLoading(newVal)
          this.$refs.enclosure.changeLoading(newVal)
        }
      }
    },
    components: {
      ReportServiceUnitForm,
      ProjectRecoredChooseCom,
      UpLoadComponent,
      SelectTree,
      UserSelect,
	  UserSelect2,
      UserSelectAll
      // ReportCancellApplyChooseCom
    },
    methods: {
      getKeyWatch (keyWatch) {
        this.keyWatch = keyWatch
      },
      init (method, id) {
        console.log('method', method)
        this.activeName = 'enclosure'
        this.reportCancellApplyService = new ReportCancellApplyService()
        this.reportReviewService = new ReportReviewService()
        this.method = method
        this.inputForm = {
          reviewBy: '', // 下一个节点审核人
          sealType: '',
          reportNumber: '',
          reportType: '',
          businessType: '',
          auditBusinessType: '',
          reportDate: '',
          servedUnitName: '', // 被服务单位
          registerAddress: '',
          securityBusiness: '',
          businessLocation: '',
          auditFees: '',
          documentNo: '',
          projectName: '',
          projectNumber: '',
          officeId: '',
          signatureAnnotator1: '',
          signatureAnnotator2: '',
          signatureType: '',
          projectMasterName: '',
          cwProjectInfoList: [],
          status: '',
          realCreate: '',
          userName: '',
          detailFor1010: [],
          detailFor1020: [],
          detailFor1030: [],
          details: [],
          projectId: '',
          reportNewLineId: '',
          id: '',
          createDate: '',
          createBy: {
            id: '',
            name: ''
          },
          remarks: '',
          reportNo: '',
          reportReviewNo: '',
          allPrintNum: '',
          issueNum: '',
          placeOnFileNum: '',
          printedBy: '',
          checkAutograph: '',
          computerNo: '',
          reportTitleType: '',
          needUpdate1: '',
          needUpdate2: '',
          needUpdate3: '',
          remark1: '',
          remark2: '',
          remark3: '',
          opinionType: '',
          cwFileInfoList: [],
          cwFileInfoList2: [],
          servedUnitId: '',
          reviewStatus: '',
          taskName: '',
          realHeaderName: '',
          projectMasterId1: '',
          projectMasterId2: '',
          industry: '',
          businessObjects: ''
        }
        this.inputForm.id = id
        this.loading = false
        this.$refs.enclosure.clearUpload()
        this.$refs.archiveFile.clearUpload()
        this.$refs.signatureFile.clearUpload()
        this.reviewBys = []
        this.$nextTick(() => {
          // this.$refs.inputForm.resetFields()

          this.loading = true
          projectReportService.queryById(this.inputForm.id).then((data) => {
            // this.$refs.uploadComponent.clearUpload()
            this.inputForm = this.recover(this.inputForm, data)
            this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD')
            }
            if (this.commonJS.isEmpty(data.details)) {
              this.reportReviewService.list('1').then((data) => { this.detailDivide(data) })
            } else {
              this.detailDivide(data.details)
            }
            if (this.commonJS.isNotEmpty(data.procInsId3)) {
              this.reportReviewService.getProcessStatus(data.procInsId3).then((data) => {
                this.inputForm.taskName = data
              })
            }
            if (data.reviewBys) {
              data.reviewBys.forEach(re => {
                let va = {
                  label: re.name,
                  value: re.sysUserId
                }
                this.reviewBys.push(va)
              })
            }
            if (this.status === 'taskFormDetail' || this.status === 'audit') {
              this.method = 'view'
            } else {
              this.method = 'false'
            }
            if (this.commonJS.isEmpty(this.inputForm.signatureType) && this.method !== 'view') {
              this.inputForm.signatureType = '1'
            }
            this.$refs.enclosure.newUpload(this.method, 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)
            this.loading = false
          })
        })
      },
      detailDivide (details) {
        this.inputForm.detailFor1010 = []
        this.inputForm.detailFor1020 = []
        this.inputForm.detailFor1030 = []
        details.forEach(item => {
          if (item.sort.toString().startsWith('1010')) {
            this.inputForm.detailFor1010.push(item)
            this.tableKeyClient = Math.random()
          }
          if (item.sort.toString().startsWith('1020')) {
            this.inputForm.detailFor1020.push(item)
            this.tableKeyClient2 = Math.random()
          }
          if (item.sort.toString().startsWith('1030')) {
            this.inputForm.detailFor1030.push(item)
            this.tableKeyClient3 = Math.random()
          }
        })
      },
      /* openContractForm () {
        if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
          this.$refs.reportCancellApplyChooseCom.init()
        } else {
          this.$refs.reportCancellApplyChooseCom.init()
        }
      }, */
      /* getContract (row) {
        this.inputForm.projectName = row.projectName // 项目名称
        this.inputForm.projectId = row.id // 项目id
        this.inputForm.projectMasterName = row.projectMasterName // 项目经理
        this.inputForm.reportNo = row.reportNo // 报告文号
        this.inputForm.reportNewLineId = row.reportNewLineId // 新建行id
        this.inputForm.reportSponsor = row.reportSponsor // 报告主办人
        this.clearClientList()
        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)) {
          projectReportService.queryById(this.inputForm.id).then((data) => {
            if (this.commonJS.isNotEmpty(data.reviewStatus) && data.reviewStatus !== '0' && data.reviewStatus !== '1' && data.reviewStatus !== '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 projectReportService.queryById(this.inputForm.id).then((data) => {
          if (data.reviewStatus !== '2') { // 审核状态不是“待审核”，就弹出提示
            this.loading = false
            this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
            throw new Error()
          } else {
            this.doSubmit('agree', callback)
          }
        })
      },
      reapplyForm (callback) {
        this.loading = true
        projectReportService.queryById(this.inputForm.id).then((data) => {
          if (data.reviewStatus !== '4') { // 审核状态不是“驳回”，就弹出提示
            this.loading = false
            this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
            throw new Error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
          } else {
            this.doSubmit('reapply', callback)
          }
        })
      },
      // 表单提交
      doSubmit (status, callback) {
        if (status === 'save') {
          // 暂存
          this.inputForm.reviewStatus = '1'
          this.loading = true
          this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD')
          // 验证报告 日期报告 类型是否出具报告 意见类型 是否为空
          // eslint-disable-next-line no-unused-expressions
          // 列表处理
          this.inputForm.details = []
          this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
          this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
          this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
			//根据签字注师1的人员id去查是否超过了100次
			userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
				if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
					if(data.name === '王真' && data.accountantUserCount <= 120){

						this.reportReviewService.save(this.inputForm).then((data) => {
							this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
							projectReportService.saveForm(this.inputForm).then((da) => {
								callback(data.businessTable, data.businessId, this.inputForm)
								this.loading = false
							}).catch(() => {
								this.loading = false
							})
						}).catch(() => {
							this.loading = false
						})
					}else{
						this.$message.error(`请选择被选次数小于100次的签字注师人员`)
						this.loading = false
						throw new Error()
					}
				} else {
					this.reportReviewService.save(this.inputForm).then((data) => {
						this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
						projectReportService.saveForm(this.inputForm).then((da) => {
							callback(data.businessTable, data.businessId, this.inputForm)
							this.loading = false
						}).catch(() => {
							this.loading = false
						})
					}).catch(() => {
						this.loading = false
					})
				}
			});
          return
        } else if (status === 'start') {
          // 送审  待审核
          this.inputForm.reviewStatus = '2'
          this.inputForm.assignee = this.inputForm.reviewBy
        } else if (status === 'agree') {
          // 审核同意
          this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
          this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
          this.inputForm.agreeUserId = this.$store.state.user.id
          // this.inputForm.status = '5'
        } else if (status === 'reapply') {
          this.inputForm.reviewStatus = '2'
          this.inputForm.assignee = this.inputForm.reviewBy
        }
        this.$refs['inputForm2'].validate((valid) => {
          if (valid) {
            this.loading = true
            if (this.commonJS.isEmpty(this.inputForm.createDate)) {
              this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD')
            }
            // 列表处理
            this.inputForm.details = []
            this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
            this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
            this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
			  if (status === 'agree') {
				  this.reportReviewService.save(this.inputForm).then((data) => {
					  this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
					  console.log('this.inputForm', this.inputForm)
					  projectReportService.saveForm(this.inputForm).then((da) => {
						  callback(data.businessTable, data.businessId, this.inputForm)
						  this.loading = false
					  }).catch(() => {
						  this.loading = false
					  })
				  }).catch(() => {
					  this.loading = false
				  })
			  }else{
				  //根据签字注师1的人员id去查是否超过了100次
				  userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
					  if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
						  if(data.name === '王真' && data.accountantUserCount <= 120){

							  this.reportReviewService.save(this.inputForm).then((data) => {
								  this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
								  console.log('this.inputForm', this.inputForm)
								  projectReportService.saveForm(this.inputForm).then((da) => {
									  callback(data.businessTable, data.businessId, this.inputForm)
									  this.loading = false
								  }).catch(() => {
									  this.loading = false
								  })
							  }).catch(() => {
								  this.loading = false
							  })
						  }else{
							  this.$message.error(`请选择被选次数小于100次的签字注师人员`)
							  this.loading = false
							  throw new Error()
						  }
					  } else {
						  this.reportReviewService.save(this.inputForm).then((data) => {
							  this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
							  console.log('this.inputForm', this.inputForm)
							  projectReportService.saveForm(this.inputForm).then((da) => {
								  callback(data.businessTable, data.businessId, this.inputForm)
								  this.loading = false
							  }).catch(() => {
								  this.loading = false
							  })
						  }).catch(() => {
							  this.loading = false
						  })
					  }
				  });
			  }
          } else {
            this.loading = false
          }
        })
      },
      async updateStatusById (type, callback) {
        this.loading = true
        if (type === 'reject' || type === 'reback') {
          await projectReportService.queryById(this.inputForm.id).then((data) => {
            if (data.reviewStatus !== '2') { // status的值不等于“审核中”就弹出提示
              this.loading = false
              this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
              throw new Error()
            } else {
              if (type === 'reject') {
                this.reportReviewService.queryByReportId(this.inputForm.id).then((review) => {
                	console.log('review', review)
                  this.commonApi.getTaskNameByProcInsId(review.procInsId).then((data) => {
                    if (data === '二级复核') { // 二级复核 进入下面操作，不是二级复核 直接驳回
                      this.reportReviewService.getHaveReportNo(this.inputForm.id).then((haveReportNo) => { // 根据报告id查询是否已经生成报告文号
                        console.log(haveReportNo)
                        if (haveReportNo === '1' || haveReportNo === 1) { // 返回值为 ’1‘，已生成报告文号，直接驳回
                          this.rejectOn(callback)
                        } else { // 返回值为 ’0‘，未生成报告文号，询问是否需要生成报告文号？是 则生成后驳回，否 则直接驳回
                          this.$confirm(`是否需要生成报告文号?`, '提示', {
                            confirmButtonText: '确定',
                            cancelButtonText: '取消',
                            type: 'warning'
                          }).then(() => { // 是  则生成报告文号后驳回
                            this.reportReviewService.saveReportNo(this.inputForm.id).then(() => {
                              this.rejectOn(callback)
                            })
                          }).catch(() => { // 否  则直接驳回
                            this.rejectOn(callback)
                          })
                        }
                      })
                    } else {
                      this.rejectOn(callback)
                    }
                  })
                })
              }
              if (type === 'reback') {
                // 撤回
                let param = {reviewStatus: '3', id: this.inputForm.id}
                this.reportReviewService.updateReviewStatysByReportId(param)
              }
            }
          })
        } else if (type === 'hold') {
          projectReportService.queryById(this.inputForm.id).then((data) => {
            if (data.reviewStatus !== '4') { // status的值不等于“驳回”就弹出提示
              this.loading = false
              this.$message.error('任务数据已发生改变或不存在，请在待办任务中确认此任务是否存在')
              throw new Error()
            } else {
              // 终止
              let param = {reviewStatus: '1', id: this.inputForm.id}
              this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
                callback()
                this.loading = false
              })
            }
          })
        }
      },
      // 这个方法是这个之前这个页面的驳回方法，现在粘出来复用
      rejectOn (callback) {
        // 驳回
        let param
        this.inputForm.reviewStatus = '4'
        // 列表处理
        this.inputForm.details = []
        this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
        this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
        this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
        param = {reviewStatus: this.inputForm.reviewStatus,
          id: this.inputForm.id,
          needUpdate2: this.inputForm.needUpdate2,
          needUpdate3: this.inputForm.needUpdate3,
          remark2: this.inputForm.remark2,
          remark3: this.inputForm.remark3,
          details: this.inputForm.details
        }
        this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
          this.loading = false
          callback()
        })
      },
      close () {
        this.inputForm = {
          id: '',
          createDate: '',
          createBy: {
            id: '',
            name: this.$store.state.user.name
          },
          remarks: '',
          reportNo: '',
          reportReviewNo: '',
          allPrintNum: '',
          issueNum: '',
          placeOnFileNum: '',
          printedBy: '',
          checkAutograph: '',
          computerNo: '',
          reportTitleType: '',
          needUpdate1: '',
          remark1: '',
          opinionType: '',
          reportSponsor: '',
          projectMasterName: '',
          tableKeyClient: '1',
          realHeaderName: '',
          projectMasterId1: '',
          projectMasterId2: '',
          industry: '',
          businessObjects: ''
        }
        this.reviewBys = []
        // this.$refs.uploadComponent.clearUpload()
        // this.$refs.inputForm.resetFields()
        this.$refs.enclosure.clearUpload()
        this.$refs.archiveFile.clearUpload()
        this.$refs.signatureFile.clearUpload()
      },
      tabHandleClick (event) {
        // console.log(event)
      },
      // 删除
      removeEvent (row, rowIndex, type) {
        if (type === 'client') {
          this.$refs.clientTable.remove(row)
        }
      },
      openContractForm () {
        if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
          // this.$refs.projectInfoForm.init(this.inputForm.contractId)
          this.$refs.projectRecoredChooseCom.init(this.inputForm.contractId)
        } else {
          this.$refs.projectRecoredChooseCom.init()
          // this.$refs.projectInfoForm.init()
        }
      },
      getContract (row) {
        // console.log('row', row)
        this.inputForm.projectName = row.projectName // 项目名称
        this.inputForm.projectId = row.id // 项目id
        this.inputForm.projectNumber = row.projectNumber // 项目编号
        this.inputForm.projectMasterName = row.projectMasterName // 项目经理
        this.clearClientList()
        this.$forceUpdate()
        this.inputForm.cwProjectInfoList = []
      },
      openWorkClient () {
        this.$refs.reportServiceUnitForm.init(this.inputForm.projectId)
      },
      getWorkClientChoose (row) {
        this.inputForm.servedUnitName = row.name
        this.inputForm.servedUnitId = row.id
        this.inputForm.sealType = '未盖章'
        // this.tableKeyClient = Math.random()
      },
      changeBusinessType () {
        // 切换业务类型的时候，审计业务类型清空
        this.inputForm.auditBusinessType = ''
      },
      changeSignatory1 (value) {
        if (this.inputForm.signatureAnnotator2 === value && this.commonJS.isNotEmpty(value)) {
          this.$message.warning('首次发行签字注师1和首次发行签字注师2不可以相同')
          this.$nextTick(() => {
            this.inputForm.signatureAnnotator1 = ''
            this.$refs.userSelect1.changeNameValue('')
            this.$refs.userSelect1.clearSelectData()
            this.$forceUpdate()
          })
        } else if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator2) &&
          this.inputForm.projectMasterId1 !== this.inputForm.signatureAnnotator2 &&
          this.inputForm.projectMasterId2 !== this.inputForm.signatureAnnotator2 &&
          this.inputForm.projectMasterId1 !== value &&
          this.inputForm.projectMasterId2 !== value &&
          this.commonJS.isNotEmpty(value)) {
          this.$message.warning('签字注师1和签字注师2至少有一个与项目经理相同')
          this.$nextTick(() => {
            this.inputForm.signatureAnnotator1 = ''
            this.$refs.userSelect1.changeNameValue('')
            this.$refs.userSelect1.clearSelectData()
            this.$forceUpdate()
          })
        } else {
          this.inputForm.signatureAnnotator1 = value
        }
      },
      changeSignatory2 (value) {
        if (this.inputForm.signatureAnnotator1 === value && this.commonJS.isNotEmpty(value)) {
          this.$message.warning('首次发行签字注师1和首次发行签字注师2不可以相同')
          this.$nextTick(() => {
            this.inputForm.signatureAnnotator2 = ''
            this.$refs.userSelect2.changeNameValue('')
            this.$refs.userSelect2.clearSelectData()
            this.$forceUpdate()
          })
        } else if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator1) &&
          this.inputForm.projectMasterId1 !== this.inputForm.signatureAnnotator1 &&
          this.inputForm.projectMasterId2 !== this.inputForm.signatureAnnotator1 &&
          this.inputForm.projectMasterId1 !== value && this.commonJS.isNotEmpty(value) &&
          this.inputForm.projectMasterId2 !== value) {
          this.$message.warning('签字注师1和签字注师2至少有一个与项目经理相同')
          this.$nextTick(() => {
            this.inputForm.signatureAnnotator2 = ''
            this.$refs.userSelect2.changeNameValue('')
            this.$refs.userSelect2.clearSelectData()
            this.$forceUpdate()
          })
        } else {
          this.inputForm.signatureAnnotator2 = value
        }
      },

	  changeValue(now){
			this.inputForm.detailFor1010.forEach(res=>{
				res.reviewComments=now.value
			})
	  },
	  changeValue1(now){
			this.inputForm.detailFor1020.forEach(res=>{
				res.reviewComments=now.value
			})
	  },
	  changeValue2(now){
		  this.inputForm.detailFor1030.forEach(res=>{
			  res.reviewComments=now.value
		  })
	  }


	}
  }
</script>
<style scoped>
  /deep/ .el-input-number .el-input__inner {
    text-align: left;
  }

  /deep/ .vxe-select-option {
	  padding: 0 .6em;
	  max-width: 600px;
	  overflow: visible;
	  text-overflow: ellipsis;
	  white-space: nowrap;
	  -webkit-user-select: none;
	  -moz-user-select: none;
	  -ms-user-select: none;
	  user-select: none
  }
</style>
