<template>
  <div>
    <div style="display: flex">
      <div style="width: 48%">
        <div>
          <el-form :model="dataOldForm" ref="dataOldForm" label-width="80px">
            <div style="text-align: left;padding-bottom: 1%;font: bold 16px 新宋体">一、合同名称</div>
            <el-form-item label="合同名称" prop="contractName" label-width="12%">
              <el-input disabled v-model="dataOldForm.contractName" placeholder="合同名称" label-width="12%"></el-input>
            </el-form-item>
            <el-form-item label="新合同名称" prop="contractName" label-width="12%">
              <el-input disabled v-model="dataOldForm.contractNewName" placeholder="新合同名称"></el-input>
            </el-form-item>
            <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">二、导入导出</div>
            <div style="border-bottom: 1px solid grey;text-align: center;width: 90%;margin-left: 5%"></div>
            <div style="width: 84%;padding-left: 8%;font-size: 16px" @click="lookProject(dataOldForm.projectIds)">
              <div style="display: flex">
                <div style="text-align: left;padding: 1% 0 1% 5%;width: 84%">详情</div>
                <div style="padding-top: 2%">
                  <div class="arrowOpenRight"></div>
                </div>
              </div>
            </div>
            <div style="border-bottom: 1px solid grey;text-align: center;width: 90%;margin-left: 5%"></div>
            <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">三、属性定义</div>
            <el-form-item label="合同年份" prop="contractYear" label-width="12%">
              <el-date-picker
                v-model="dataOldForm.contractYear"
                disabled
                type="year"
                placeholder="选择年"
                style="width: 100%"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="直非友" prop="contractZfyId" label-width="12%">
              <el-select
                disabled
                v-model="dataOldForm.contractZfyId"
                placeholder="选择直非友"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicZFYList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="施工单位" prop="contractSgdwId" label-width="12%">
              <el-select
                disabled
                v-model="dataOldForm.contractSgdwId"
                placeholder="选择施工单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSGDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="监理单位" prop="contractJldwId" label-width="12%">
              <el-select
                disabled
                v-model="dataOldForm.contractJldwId"
                placeholder="选择监理单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicJLDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="一审单位" prop="contractYsdwId" label-width="12%">
              <el-select
                disabled
                v-model="dataOldForm.contractYsdwId"
                placeholder="选择一审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="二审单位" prop="contractEsdwId" label-width="12%">
              <el-select
                disabled
                v-model="dataOldForm.contractEsdwId"
                placeholder="选择二审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-form>
          <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">四、进项发票</div>
          <span>1、相关描述</span><br>
          <el-input disabled v-model="dataOldForm.contractJxfp"></el-input>
          <span>2、相关照片</span><br>
          <el-upload
            disabled
            class="avatar-uploader"
            :headers="headers"
            accept="image/jpeg,image/jpg,image/png"
            :action="imageUploaderUrl"
            :show-file-list="false">
            <img :src="imageUrl" class="avatar">
          </el-upload>
          <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">五、送审进度</div>
          <table style="text-align: center;" border="1" cellspacing="0" cellpadding="0">
            <tr><td style="text-align: center;font-weight: bold" colspan="6">基本信息</td></tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">合同名称</td>
              <td style="width: 30vw;"><el-input readonly v-model="dataOldExcelForm.contractName" placeholder="自动生成" style="border-style: none;"></el-input></td>
              <td style="width: 15vw;font-weight: bold">合同金额</td>
              <td style="width: 15vw;font-weight: bold">合同签订时间</td>
              <td style="width: 15vw;font-weight: bold">付款比例</td>
              <td style="width: 15vw;font-weight: bold">验收时间</td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">建设单位</td>
              <td style="width: 30vw;">
                <el-select
                  disabled
                  v-model="dataOldExcelForm.contractEsdwId"
                  placeholder="选择建设单位"
                  style="width: 100%;"
                >
                  <el-option
                    v-for="item in dicJsdwList"
                    :key="item.userId"
                    :label="item.name"
                    :value="item.userId"
                  ></el-option>
                </el-select>
              </td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写合同金额" v-model="dataOldExcelForm.excelContractMoney"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelContractQdtime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写付款比例" v-model="dataOldExcelForm.excelFkbl"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelYsbl"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">施工单位</td>
              <td style="width: 30vw;"><el-select
                disabled
                v-model="dataOldExcelForm.contractSgdwId"
                placeholder="选择施工单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSGDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;font-weight: bold">合同开工时间</td>
              <td style="width: 15vw;font-weight: bold">合同竣工时间</td>
              <td style="width: 15vw;font-weight: bold">实际开工时间</td>
              <td style="width: 15vw;font-weight: bold">实际竣工时间</td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">监理单位</td>
              <td style="width: 30vw;"><el-select
                disabled
                v-model="dataOldExcelForm.contractJldwId"
                placeholder="选择监理单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicJLDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelStartTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelEndTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelActualStart"
                  disabled
                  readonly
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelActualEnd"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold" rowspan="2">一审单位</td>
              <td style="width: 30vw;" rowspan="2"><el-select
                disabled
                v-model="dataOldExcelForm.contractYsdwId"
                placeholder="选择一审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;font-weight: bold">一审填报</td>
              <td style="width: 15vw;font-weight: bold">一审减值</td>
              <td style="width: 15vw;font-weight: bold">一审定值</td>
              <td style="width: 15vw;font-weight: bold">一审定值确定时间</td>
            </tr>
            <tr>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写一审填报" v-model="dataOldExcelForm.excelYstb"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写一审减值" v-model="dataOldExcelForm.excelYstz"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写一审定值" v-model="dataOldExcelForm.excelYsdz"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelYssureTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold" rowspan="2">二审单位</td>
              <td style="width: 30vw;" rowspan="2"><el-select
                disabled
                v-model="dataOldExcelForm.contractEsdwId"
                placeholder="选择二审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;font-weight: bold">二审填报</td>
              <td style="width: 15vw;font-weight: bold">二审减值</td>
              <td style="width: 15vw;font-weight: bold">二审定值</td>
              <td style="width: 15vw;font-weight: bold">二审定值确定时间</td>
            </tr>
            <tr>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写二审填报" v-model="dataOldExcelForm.excelEstb"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写二审减值" v-model="dataOldExcelForm.excelEsjz"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写二审定值" v-model="dataOldExcelForm.excelEsdz"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataOldExcelForm.excelEssureTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">备注</td>
              <td style="width: 30vw;" colspan="5"><el-input disabled v-model="dataOldExcelForm.excelRemark"></el-input></td>
            </tr>
            <tr>
              <td colspan="6" style="font-weight: bold">提报与审计跟踪记录</td>
            </tr>
            <tr>
              <td colspan="6" style="text-align: left">
                <span style="font-weight: bold;color: grey">记录送审、份数、时间、盖章、涉及人员等时间进程:</span><br>
                <textarea maxlength="2500" disabled v-model="dataOldExcelForm.excelRecording" style="width: 100%;height: 220px;resize: none;border: none;outline:none;"></textarea>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <div style="width: 50%;padding-left: 2%">
        <div>
          <el-form :model="dataForm" ref="dataForm" label-width="80px">
            <div style="text-align: left;padding-bottom: 1%;font: bold 16px 新宋体">一、合同名称</div>
            <el-form-item label="合同名称" prop="contractName" label-width="12%">
              <el-input disabled v-model="dataForm.contractName" placeholder="合同名称" label-width="12%"></el-input>
            </el-form-item>
            <el-form-item label="新合同名称" prop="contractName" label-width="12%">
              <el-input disabled v-model="dataForm.contractNewName" placeholder="新合同名称"></el-input>
            </el-form-item>
            <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">二、导入导出</div>
            <div style="border-bottom: 1px solid grey;text-align: center;width: 90%;margin-left: 5%"></div>
            <div style="width: 84%;padding-left: 8%;font-size: 16px" @click="lookProject(dataForm.projectIds)">
              <div style="display: flex">
                <div style="text-align: left;padding: 1% 0 1% 5%;width: 84%">详情</div>
                <div style="padding-top: 2%">
                  <div class="arrowOpenRight"></div>
                </div>
              </div>
            </div>
            <div style="border-bottom: 1px solid grey;text-align: center;width: 90%;margin-left: 5%"></div>
            <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">三、属性定义</div>
            <el-form-item label="合同年份" prop="contractYear" label-width="12%">
              <el-date-picker
                v-model="dataForm.contractYear"
                disabled
                type="year"
                placeholder="选择年"
                style="width: 100%"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="直非友" prop="contractZfyId" label-width="12%">
              <el-select
                disabled
                v-model="dataForm.contractZfyId"
                placeholder="选择直非友"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicZFYList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="施工单位" prop="contractSgdwId" label-width="12%">
              <el-select
                disabled
                v-model="dataForm.contractSgdwId"
                placeholder="选择施工单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSGDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="监理单位" prop="contractJldwId" label-width="12%">
              <el-select
                disabled
                v-model="dataForm.contractJldwId"
                placeholder="选择监理单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicJLDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="一审单位" prop="contractYsdwId" label-width="12%">
              <el-select
                disabled
                v-model="dataForm.contractYsdwId"
                placeholder="选择一审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="二审单位" prop="contractEsdwId" label-width="12%">
              <el-select
                disabled
                v-model="dataForm.contractEsdwId"
                placeholder="选择二审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-form>
          <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">四、进项发票</div>
          <span>1、相关描述</span><br>
          <el-input disabled v-model="dataForm.contractJxfp"></el-input>
          <span>2、相关照片</span><br>
          <el-upload
            disabled
            class="avatar-uploader"
            :headers="headers"
            accept="image/jpeg,image/jpg,image/png"
            :action="imageUploaderUrl"
            :show-file-list="false"
            :on-success="handleImageSuccess">
            <img :src="imageUrl" class="avatar">
          </el-upload>
          <div style="text-align: left;padding: 4% 0 1% 0;font: bold 16px 新宋体">五、送审进度</div>
          <table style="text-align: center;" border="1" cellspacing="0" cellpadding="0">
            <tr><td style="text-align: center;font-weight: bold" colspan="6">基本信息</td></tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">合同名称</td>
              <td style="width: 30vw;"><el-input readonly v-model="dataExcelForm.contractName" placeholder="自动生成" style="border-style: none;"></el-input></td>
              <td style="width: 15vw;font-weight: bold">合同金额</td>
              <td style="width: 15vw;font-weight: bold">合同签订时间</td>
              <td style="width: 15vw;font-weight: bold">付款比例</td>
              <td style="width: 15vw;font-weight: bold">验收时间</td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">建设单位</td>
              <td style="width: 30vw;">
                <el-select
                  disabled
                  v-model="dataExcelForm.contractEsdwId"
                  placeholder="选择建设单位"
                  style="width: 100%;"
                >
                  <el-option
                    v-for="item in dicJsdwList"
                    :key="item.userId"
                    :label="item.name"
                    :value="item.userId"
                  ></el-option>
                </el-select>
              </td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写合同金额" v-model="dataExcelForm.excelContractMoney"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelContractQdtime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写付款比例" v-model="dataExcelForm.excelFkbl"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelYsbl"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">施工单位</td>
              <td style="width: 30vw;"><el-select
                disabled
                v-model="dataExcelForm.contractSgdwId"
                placeholder="选择施工单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSGDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;font-weight: bold">合同开工时间</td>
              <td style="width: 15vw;font-weight: bold">合同竣工时间</td>
              <td style="width: 15vw;font-weight: bold">实际开工时间</td>
              <td style="width: 15vw;font-weight: bold">实际竣工时间</td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">监理单位</td>
              <td style="width: 30vw;"><el-select
                disabled
                v-model="dataExcelForm.contractJldwId"
                placeholder="选择监理单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicJLDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelStartTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelEndTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelActualStart"
                  disabled
                  readonly
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelActualEnd"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold" rowspan="2">一审单位</td>
              <td style="width: 30vw;" rowspan="2"><el-select
                disabled
                v-model="dataExcelForm.contractYsdwId"
                placeholder="选择一审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;font-weight: bold">一审填报</td>
              <td style="width: 15vw;font-weight: bold">一审减值</td>
              <td style="width: 15vw;font-weight: bold">一审定值</td>
              <td style="width: 15vw;font-weight: bold">一审定值确定时间</td>
            </tr>
            <tr>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写一审填报" v-model="dataExcelForm.excelYstb"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写一审减值" v-model="dataExcelForm.excelYstz"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写一审定值" v-model="dataExcelForm.excelYsdz"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelYssureTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold" rowspan="2">二审单位</td>
              <td style="width: 30vw;" rowspan="2"><el-select
                disabled
                v-model="dataExcelForm.contractEsdwId"
                placeholder="选择二审单位"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in dicSJDWList"
                  :key="item.userId"
                  :label="item.name"
                  :value="item.userId"
                ></el-option>
              </el-select></td>
              <td style="width: 15vw;font-weight: bold">二审填报</td>
              <td style="width: 15vw;font-weight: bold">二审减值</td>
              <td style="width: 15vw;font-weight: bold">二审定值</td>
              <td style="width: 15vw;font-weight: bold">二审定值确定时间</td>
            </tr>
            <tr>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写二审填报" v-model="dataExcelForm.excelEstb"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写二审减值" v-model="dataExcelForm.excelEsjz"></el-input></td>
              <td style="width: 15vw;"><el-input disabled placeholder="请填写二审定值" v-model="dataExcelForm.excelEsdz"></el-input></td>
              <td style="width: 15vw;">
                <el-date-picker
                  v-model="dataExcelForm.excelEssureTime"
                  disabled
                  type="date"
                  placeholder="选择日期"
                  style="width: 100%"
                >
                </el-date-picker>
              </td>
            </tr>
            <tr>
              <td style="width: 10vw;font-weight: bold">备注</td>
              <td style="width: 30vw;" colspan="5"><el-input disabled v-model="dataExcelForm.excelRemark"></el-input></td>
            </tr>
            <tr>
              <td colspan="6" style="font-weight: bold">提报与审计跟踪记录</td>
            </tr>
            <tr>
              <td colspan="6" style="text-align: left">
                <span style="font-weight: bold;color: grey">记录送审、份数、时间、盖章、涉及人员等时间进程:</span><br>
                <textarea maxlength="2500" disabled v-model="dataExcelForm.excelRecording" style="width: 100%;height: 220px;resize: none;border: none;outline:none;"></textarea>
              </td>
            </tr>
          </table>
        </div>
      </div>
    </div>
    <div style="text-align: center">
      <span slot="footer" class="dialog-footer">
        <el-button type="success" @click="pass()">通过</el-button>
        <el-button type="danger" @click="noPassed()">不通过</el-button>
      </span>
    </div>
    <el-dialog
      :title="'包含的立项信息列表'"
      :visible.sync="projectShow"
      append-to-body>
      <el-table
        :data="dataList"
        border
        style="width: 100%;">
        <el-table-column
          type="index"
          header-align="center"
          align="center"
          label="序号"
          width="50">
        </el-table-column>
        <el-table-column
          prop="projectYear"
          header-align="center"
          align="center"
          label="施工年份">
        </el-table-column>
        <el-table-column
          prop="projectJsdwId"
          header-align="center"
          align="center"
          label="建设单位">
          <template slot-scope="scope">
            <template v-for="item in dicJsdwList" v-if="scope.row.projectJsdwId === item.dictId">
              {{item.name}}
            </template>
          </template>
        </el-table-column>
        <el-table-column
          prop="project"
          header-align="center"
          align="center"
          label="立项名称">
        </el-table-column>
        <el-table-column
          prop="projectSgddId"
          header-align="center"
          align="center"
          label="施工地点">
          <template slot-scope="scope">
            <template v-for="item in dicSgddList" v-if="scope.row.projectSgddId === item.dictId">
              {{item.name}}
            </template>
          </template>
        </el-table-column>
        <el-table-column
          prop="projectSgjdId"
          header-align="center"
          align="center"
          label="施工进度">
          <template slot-scope="scope">
            <template v-for="item in dicSgjdList" v-if="scope.row.projectSgjdId === item.dictId">
              {{item.name}}
            </template>
          </template>
        </el-table-column>
        <el-table-column
          prop="projectPhotoConut"
          header-align="center"
          align="center"
          label="现场张片">
        </el-table-column>
        <el-table-column
          prop="isContant"
          header-align="center"
          align="center"
          label="导入合同">
          <template slot-scope="scope">
            <span v-if="scope.row.isContant === 0">否</span>
            <span v-if="scope.row.isContant === 1">是</span>
          </template>
        </el-table-column>
        <el-table-column
          fixed="right"
          header-align="center"
          align="center"
          width="70"
          label="操作">
          <template slot-scope="scope">
            <el-button type="text" size="small" @click="chooseProject(scope.row)">选择</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog
      :title="'立项信息'"
      :visible.sync="showProject"
      append-to-body>
      <el-form :model="dataProjectForm" ref="dataProjectForm" label-width="80px">

        <el-form-item label="立项名称" prop="project">
          <el-input disabled style="width: 80%" v-model="dataProjectForm.project" placeholder="暂无"></el-input>
        </el-form-item>
        <el-form-item label="新立项名称" prop="project">
          <el-input disabled style="width: 80%" v-model="dataProjectForm.projectNewName===dataProjectForm.project?'':dataProjectForm.projectNewName" placeholder="暂无"></el-input>
        </el-form-item>

        <el-form-item label="建设单位" prop="projectJsdwId">
          <el-select
            disabled
            v-model="dataProjectForm.projectJsdwId"
            placeholder="暂无"
          >
            <el-option
              v-for="item in dicJsdwList"
              :key="item.dictId"
              :label="item.name"
              :value="item.dictId"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="年份" prop="projectYear">
          <el-date-picker
            disabled
            v-model="dataProjectForm.projectYear"
            type="date"
            value-format="yyyy"
            placeholder="暂无" />
        </el-form-item>
        <el-form-item label="开工时间" prop="projectStart">
          <el-date-picker
            disabled
            v-model="dataProjectForm.projectStart"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="暂无" />
        </el-form-item>
        <el-form-item label="竣工时间" prop="projectEnd">
          <el-date-picker
            disabled
            v-model="dataProjectForm.projectEnd"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="暂无" />
        </el-form-item>
        <el-form-item label="施工地点" prop="projectSgddId">
          <el-select
            disabled
            v-model="dataProjectForm.projectSgddId"
            placeholder="暂无"
          >
            <el-option
              v-for="item in dicSgddList"
              :key="item.dictId"
              :label="item.name"
              :value="item.dictId"
            ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="工程类别" prop="projectGclbIdList">
          <el-select
            disabled
            v-model="dataProjectForm.projectGclbIdList"
            placeholder="暂无"
          >
            <el-option
              v-for="item in dicGclbList"
              :key="item.dictId"
              :label="item.name"
              :value="item.dictId"
            ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="施工进度" prop="projectSgjdId">
          <el-select
            disabled
            v-model="dataProjectForm.projectSgjdId"
            placeholder="暂无"
          >
            <el-option
              v-for="item in dicSgjdList"
              :key="item.dictId"
              :label="item.name"
              :value="item.dictId"
            ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="内容简要" prop="projectNrjy">
          <el-input style="width: 80%;" disabled v-model="dataProjectForm.projectNrjy" placeholder="内容简要"></el-input>
        </el-form-item>

        <el-form-item label="现场照片1" prop="projectPhoto1">
          <el-upload
            disabled
            class="avatar-uploader"
            :headers="headers"
            accept="image/jpeg,image/jpg,image/png"
            :action="imageUploaderUrl"
            :show-file-list="false">
            <img :src="dataProjectForm.projectPhoto1" class="avatar">
          </el-upload>
        </el-form-item>
        <el-form-item label="现场照片2" prop="projectPhoto2">
          <el-upload
            disabled
            class="avatar-uploader"
            :headers="headers"
            accept="image/jpeg,image/jpg,image/png"
            :action="imageUploaderUrl"
            :show-file-list="false">
            <img :src="dataProjectForm.projectPhoto2" class="avatar">
          </el-upload>
        </el-form-item>
        <el-form-item label="现场照片3" prop="projectPhoto3">
          <el-upload
            disabled
            class="avatar-uploader"
            :headers="headers"
            accept="image/jpeg,image/jpg,image/png"
            :action="imageUploaderUrl"
            :show-file-list="false">
            <img :src="dataProjectForm.projectPhoto3" class="avatar">
          </el-upload>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
export default {
  components: {
  },
  data () {
    return {
      dicZFYList: [],
      dicSGDWList: [],
      dicJLDWList: [],
      dicSJDWList: [],
      dicSgddList: [],
      dicSgjdList: [],
      dicJsdwList: [],
      projectShow: false,
      showProject: false,
      dataList: [], // 弹出的数据
      dataProjectForm: {
        projectId: '',
        project: '',
        projectNewName: '',
        projectJsdwId: '',
        projectYear: '',
        projectStart: '',
        projectEnd: '',
        projectSgddId: '',
        projectGclbId: '',
        projectSgjdId: '',
        projectNrjy: '',
        projectPhoto1: '',
        projectPhoto2: '',
        projectPhoto3: '',
        projectPhotoConut: '',
        isContant: '',
        status: 0,
        approval: '',
        isTotal: ''
      },
      // 页面变化数据
      dataForm: {
        id: '',
        contractName: '',
        contractNewName: '',
        contractYear: '',
        contractZfyId: '',
        contractSgdwId: '',
        contractJldwId: '',
        contractYsdwId: '',
        contractEsdwId: '',
        contractJxfp: '',
        contractSsjd: '',
        contractJxfpPhoto: '',
        status: '',
        isTotal: ''
      },
      // 原始数据
      dataOldForm: {
        id: '',
        contractName: '',
        contractNewName: '',
        contractYear: '',
        contractZfyId: '',
        contractSgdwId: '',
        contractJldwId: '',
        contractYsdwId: '',
        contractEsdwId: '',
        contractJxfp: '',
        contractSsjd: '',
        contractJxfpPhoto: '',
        status: '',
        projectId: '',
        isTotal: ''
      },
      // excel表格
      excelFlag: 0,
      dataExcelForm: {
        id: '',
        contractId: '',
        contractName: '',
        contractJsdwId: '',
        contractSgdwId: '',
        contractJldwId: '',
        contractYsdwId: '',
        contractEsdwId: '',
        excelContractMoney: '',
        excelContractQdtime: '',
        excelFkbl: '',
        excelYsbl: '',
        excelStartTime: '',
        excelEndTime: '',
        excelActualStart: '',
        excelActualEnd: '',
        excelYstb: '',
        excelYstz: '',
        excelYsdz: '',
        excelYssureTime: '',
        excelEstb: '',
        excelEsjz: '',
        excelEsdz: '',
        excelEssureTime: '',
        excelRemark: '',
        excelRecording: ''
      },
      dataOldExcelForm: {
        id: '',
        contractId: '',
        contractName: '',
        contractJsdwId: '',
        contractSgdwId: '',
        contractJldwId: '',
        contractYsdwId: '',
        contractEsdwId: '',
        excelContractMoney: '',
        excelContractQdtime: '',
        excelFkbl: '',
        excelYsbl: '',
        excelStartTime: '',
        excelEndTime: '',
        excelActualStart: '',
        excelActualEnd: '',
        excelYstb: '',
        excelYstz: '',
        excelYsdz: '',
        excelYssureTime: '',
        excelEstb: '',
        excelEsjz: '',
        excelEsdz: '',
        excelEssureTime: '',
        excelRemark: '',
        excelRecording: ''
      }
    }
  },
  methods: {
    getDataList (id) {
      this.dataForm.id = id || 0
      this.visible = true
      this.$nextTick(() => {
        this.$refs['dataForm'].resetFields()
        this.$http.request({
          url: this.$http.adornUrl('/business/businessapproval/info/' + id),
          method: 'get'
        }).then(({data}) => {
          const res = data.businessApproval
          if (data && data.code === 0) {
            this.dataForm = {
              ...JSON.parse(res.approvalData)
            }
            this.projectIds = this.dataForm.projectId
              // console.log(this.projectIds);
            this.dataOldForm = {
              ...JSON.parse(res.approvalOldData)
            }
            this.oldProjectIds = this.dataOldForm.projectId
              // console.log(this.oldProjectIds);
              // 送审进度
            this.dataExcelForm = {
              ...JSON.parse(res.approvalSonData)
            }
            this.dataOldExcelForm = {
              ...JSON.parse(res.approvalSonOldData)
            }

            if (this.dataOldForm.contractJxfpPhoto !== null && this.dataOldForm.contractJxfpPhoto !== '' && this.dataOldForm.contractJxfpPhoto !== undefined) {
              this.$http.request({
                url: this.$http.adornUrl('/sys/oss/list' + '?filePath=' + this.dataOldForm.contractJxfpPhoto),
                method: 'get'
              }).then(({data}) => {
                this.dataOldForm.contractJxfpPhoto = data.replace(/[\r\n]/g, '')
              })
            }
            if (this.dataForm.contractJxfpPhoto !== this.dataOldForm.contractJxfpPhoto) {
              if (this.dataForm.contractJxfpPhoto !== null && this.dataForm.contractJxfpPhoto !== '' && this.dataForm.contractJxfpPhoto !== undefined) {
                this.$http.request({
                  url: this.$http.adornUrl('/sys/oss/list' + '?filePath=' + this.dataForm.contractJxfpPhoto),
                  method: 'get'
                }).then(({data}) => {
                  this.dataForm.contractJxfpPhoto = data.replace(/[\r\n]/g, '')
                })
              }
            }
          }
        })
      })
      this.$http.request({
        url: this.$http.adornUrl('/business/businessdict/list'),
        method: 'get'
      }).then(({data}) => {
        if (data && data.code === 0) {
          data.data.forEach((item) => {
            if (item.dictCode === 'construction_unit') { // 建设单位
              this.dicJSDWList = item.children
            } else if (item.dictCode === 'is_friend') { // 直非友
              this.dicZFYList = item.children
            } else if (item.dictCode === 'building_section') { // 施工单位
              this.dicSGList = item.children
            } else if (item.dictCode === 'serveillance_unit') { // 监理单位
              this.dicJLList = item.children
            } else if (item.dictCode === 'approval_unit') { // 监理单位
              this.dicSJDWList = item.children
            } else if (item.dictCode === 'work_place') { // 施工地点
              this.dicSgddList = item.children
            } else if (item.dictCode === 'work_tatus') { // 施工进度
              this.dicSgjdList = item.children
            } else if (item.dictCode === 'construction_unit') { // 建设单位
              this.dicJsdwList = item.children
            }
          })
        }
      })
    },
    pass () {
      if (this.dataExcelForm.id !== undefined && this.dataExcelForm.id !== null && this.dataExcelForm.id === '') {
        this.$http.request({
          url: this.$http.adornUrl('/business/businessapproval/pass'),
          method: 'post',
          body: this.$http.adornData({
            'id': this.id,
            'approvalData': JSON.stringify(this.dataForm),
            'approvalExcel': JSON.stringify(this.dataExcelForm),
            'approvalType': 4
          })
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.$message({
              message: '操作成功',
              type: 'success',
              duration: 1500,
              onClose: () => {
                this.visible = false
                this.$emit('refreshDataList')
              }
            })
          } else {
            this.$message.error(data.msg)
          }
        })
      } else {
        this.$http.request({
          url: this.$http.adornUrl('/business/businessapproval/pass'),
          method: 'post',
          body: this.$http.adornData({
            'id': this.id,
            'approvalData': JSON.stringify(this.dataForm),
            'approvalType': 4
          })
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.$message({
              message: '操作成功',
              type: 'success',
              duration: 1500,
              onClose: () => {
                this.visible = false
                this.$emit('refreshDataList')
              }
            })
          } else {
            this.$message.error(data.msg)
          }
        })
      }
    },
    noPassed () {
      if (this.dataExcelForm.id !== undefined && this.dataExcelForm.id !== null && this.dataExcelForm.id === '') {
        this.$http.request({
          url: this.$http.adornUrl('/business/businessapproval/noPass'),
          method: 'post',
          body: this.$http.adornData({
            'id': this.id,
            'approvalId': this.dataForm.id,
            'approvalSonId': this.dataExcelForm.id,
            'approvalType': 4
          })
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.$message({
              message: '操作成功',
              type: 'success',
              duration: 1500,
              onClose: () => {
                this.visible = false
                this.$emit('refreshDataList')
              }
            })
          } else {
            this.$message.error(data.msg)
          }
        })
      } else {
        this.$http.request({
          url: this.$http.adornUrl('/business/businessapproval/noPass'),
          method: 'post',
          body: this.$http.adornData({
            'id': this.id,
            'approvalId': this.dataForm.id,
            'approvalType': 4
          })
        }).then(({data}) => {
          if (data && data.code === 0) {
            this.$message({
              message: '操作成功',
              type: 'success',
              duration: 1500,
              onClose: () => {
                this.visible = false
                this.$emit('refreshDataList')
              }
            })
          } else {
            this.$message.error(data.msg)
          }
        })
      }
    },
    lookProject (ids) {
      this.projectShow = true
      this.dataList = []
      this.$http.request({
        url: this.$http.adornUrl('/business/businesssearchbyhtgz/peojectList/' + ids),
        method: 'get'
      }).then(({data}) => {
        if (data && data.code === 0) {
          this.dataList = data.page
        }
      })
    },
    chooseProject (projectId) {
      this.showProject = true
      this.$http.request({
        url: this.$http.adornUrl('/business/businesssearchbyhtgz/peojectList/' + projectId),
        method: 'get'
      }).then(({data}) => {
        if (data && data.code === 0) {
          this.dataProjectForm = {
            ...data.data.page.project
          }
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
