11
WXL
2023-09-12 5d624d5ad0cdce0737e565c288b0efeb8b42aef8
src/views/project/fund/applyDetail/index.vue
@@ -157,14 +157,22 @@
          </el-col>
        </el-row>
        <el-row v-if="jurisdiction">
          <!-- <el-alert title="当前为查看状态,不支持修改存储。" type="warning">
          </el-alert> -->
          <el-alert
            title="当前为查看状态,不支持修改存储。"
            type="warning"
            show-icon
          >
          </el-alert>
        </el-row>
        <el-row v-if="businessType == 2">
          <div style="margin-bottom: 15px;">
            <el-button
              type="success"
              icon="el-icon-download"
              @click="Batchentry"
              >批量录入</el-button
            >
          </div>
        </el-row>
        <el-row>
          <el-table
@@ -394,20 +402,6 @@
                  @click="ShowDetailDialog(scope, 'unit')"
                  >{{ scope.row.unitname }}</el-button
                >
                <!-- <el-select
                  v-model="scope.row.unitno"
                  placeholder="单位"
                  clearable
                  filterable
                  allow-create
                >
                  <el-option
                    v-for="(spec, index) in unitList"
                    :key="index"
                    :label="spec.organizationname"
                    :value="spec.organizationid"
                  ></el-option>
                                      </el-select> -->
              </template>
            </el-table-column>
            <el-table-column
@@ -422,11 +416,7 @@
                  type="primary"
                  plain
                  @click="ShowDetailDialog(scope, 'expert')"
                  >{{
                    experthear == "expert"
                      ? scope.row.unitname
                      : scope.row.beneficiaryname
                  }}</el-button
                  >{{ scope.row.beneficiaryname }}</el-button
                >
                <!-- <el-select
                  v-model="scope.row.unitno"
@@ -879,7 +869,7 @@
                ref="beneficiaryname"
                default-first-option
                @change="bbaaccss"
                v-model="funddetailForm.beneficiaryname"
                v-model="Personnelforname"
                placeholder="请选择"
                style="width: 100%"
              >
@@ -896,7 +886,7 @@
          <el-col :span="24" v-if="experthear == 'expert'">
            <el-form-item label="单位名称" prop="unitno" label-width="120px">
              <el-select
                v-model="funddetailForm.unitname"
                v-model="unitforname"
                placeholder="单位名称"
                @change="bbaaccss"
                clearable
@@ -1125,7 +1115,7 @@
          </div> -->
        </div>
        <div v-if="this.previewpdf" class="pdfimgmin">
        <div v-if="this.previewpdf && pdfimgsrcList.length" class="pdfimgmin">
          <!-- <img :src="pdfimg" /> -->
          <el-image
            style="width: 95%; height: 90%"
@@ -1152,10 +1142,45 @@
        <el-button type="primary" @click="Savenow">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 批量选取 -->
    <el-dialog
      title="批量生成明细信息"
      :visible.sync="batchdialogVisible"
      width="30%"
    >
      <div style="max-height: 300px; overflow-y: auto">
        <el-checkbox
          :indeterminate="isIndeterminate"
          v-model="checkAll"
          @change="handleCheckAllChange"
          >全选</el-checkbox
        >
        <div style="margin: 15px 0;"></div>
        <el-checkbox-group
          v-model="checkedCities"
          @change="handleCheckedCitiesChange"
        >
          <el-checkbox
            border
            v-for="city in cityOptions"
            :label="city"
            :key="city.reportNo"
            >{{ city.reportName }}</el-checkbox
          >
        </el-checkbox-group>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="BatchentryFn">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
// 'sdaad2123UD2',1  'wsadadwsad',4 'sdadaddad',3 'ssaaddxs',2
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
//例如:import 《组件名称》 from '《组件路径》';
import {
@@ -1293,8 +1318,14 @@
      feeUnitList: [],
      // 网络请求头
      Networkheader: null,
      batchdialogVisible: false,
      itemlist: [],
      cityOptions: [],
      checkAll: false,
      checkedCities: [],
      Personnelforname: "请选择",
      unitforname: "请选择",
      isIndeterminate: true,
      //是否是专家费的OPO审批人员
      ismanager: false,
@@ -1449,7 +1480,7 @@
      pdfimgsrcList: [],
      pdfVisible: false,
      previewpdf: false,
      hintitle: "选中左侧已上传文件预览查看",
      hintitle: "请上传文件后查看",
      atpresent: "",
      Savereminder: false, //提醒保存弹框
      Reminderquantity: 0, //提醒数量
@@ -2757,7 +2788,86 @@
        }
      });
    },
    handleCheckAllChange(val) {
      console.log(val);
      this.checkedCities = val ? this.cityOptions : [];
      this.isIndeterminate = false;
    },
    handleCheckedCitiesChange(value) {
      console.log(value);
      console.log(this.checkedCities);
      let checkedCount = value.length;
      console.log(checkedCount);
      this.checkAll = checkedCount === this.cityOptions.length;
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.cityOptions.length;
    },
    // 批量录入点击
    Batchentry() {
      // ethical
      listReportname("ethical").then(res => {
        console.log(res);
        this.cityOptions = res.data;
      });
      this.batchdialogVisible = true;
    },
    // 确认录入
    BatchentryFn() {
      this.checkedCities.forEach(item => {
        console.log(item);
        let rowData = {
          orderno: null,
          id: item.id,
          fundid: null,
          beneficiaryname: item.reportName,
          beneficiaryno: null,
          unitname: item.unitname,
          unitno: null,
          uintuserno: null,
          title: item.title,
          idcardtype: null,
          idcardno: item.idcrad,
          sex: null,
          familyrelations: null,
          phone: null,
          depositbank: item.depositbank,
          bankcardno: item.bankcardno,
          branchbankname: item.branchbankname,
          annexbankcard: null,
          annexregistform: null,
          applytype: "伦理审核专家费",
          itemid: "器官捐献伦理审核专家费",
          itemname: null,
          itemtype: null,
          amount: 200,
          prepaidamount: null,
          taxamount: null,
          invoicecount: null,
          taxedamount: null,
          attachcount: null,
          remark: null,
          recordstatus: "-1",
          delFlag: null,
          createBy: null,
          createTime: null,
          updateBy: null,
          updateTime: null,
          uploadflag: null,
          uploadtime: null,
          itemlist: [],
          servicesscope: null,
          rowfeeblocks: [],
          annexfiles: null
        };
        console.log(rowData);
        this.rbDetails.push(rowData);
      });
      for (let i = 0; i < this.checkedCities.length + 1; i++) {
        this.rbDetails[i].orderno = i + 1;
      }
      this.batchdialogVisible = false;
    },
    //新增一行
    addRow(rowIndex) {
      let rowData = {
@@ -2827,6 +2937,11 @@
        type: "success"
      })
        .then(() => {
          console.log(this.rbDetails.length);
          if (this.rbDetails.length == 1) {
            console.log("新增");
            this.addRow(0);
          }
          if (row.id !== null) {
            delFunddetail(row.id).then(res => {
              if (res.code === 200) {
@@ -2860,9 +2975,6 @@
        });
      //全部删除后添加一条新行
      if (this.rbDetails.length == 1) {
        this.addRow(0);
      }
    },
    //计算总金额
@@ -2959,28 +3071,10 @@
    //文件上传
    handleUploadError() {},
    /** 下载文件按钮操作 */
    // downFile(item) {
    //   const url = process.env.VUE_APP_BASE_API + item.url;
    //   var a = document.createElement("a");
    //   var event = new MouseEvent("click");
    //   a.download = item.name;
    //   a.href = url;
    //   a.dispatchEvent(event);
    // },
    // remove(file) {
    //   this.fileList.splice(this.fileList.indexOf(file), 1)
    // },
    remove(file, fileList) {
      const rbDetails = [...this.rbDetails];
      this.fileListto.splice(this.fileListto.indexOf(file), 1);
      rbDetails[this.atpresent].annexfilesList = this.fileListto;
    },
    handleExceed() {
      this.$message.error(`上传文件数量不能超过 ${5} 个!`);
    },
    //文件上传成功回调
@@ -3123,7 +3217,18 @@
    //专家/医疗机构/费用报销机构选择
    ConfirmDetailDialog() {
      console.log(this.funddetailForm.tempExpertName);
      console.log(this.unitforname);
      console.log(this.Personnelforname);
      if (this.businessType == 4) {
        if (this.experthear == "expert") {
          this.funddetailForm.beneficiaryname = this.unitforname;
        } else {
          console.log(11);
          this.funddetailForm.beneficiaryname = this.Personnelforname;
          console.log(this.funddetailForm.beneficiaryname);
        }
      }
      console.log(this.funddetailForm);
      let tempIndex = this.funddetailForm.index;
      let tempExpertName = this.funddetailForm.beneficiaryname;
@@ -3250,7 +3355,10 @@
      // if (this.experthear == "unit") {
      //   singleDetail.unitname = "";
      // }
      singleDetail.unitname = this.funddetailForm.unitname;
      if (this.businessType == 4) {
        singleDetail.beneficiaryname = this.funddetailForm.beneficiaryname;
      }
      console.log(singleDetail);
      console.log(this.funddetailForm);
      this.rbDetails[tempIndex] = singleDetail;
      this.showSelectionDialog = false;
@@ -3364,7 +3472,11 @@
  text-align: center;
}
::v-deep .el-alert__title {
  font-size: 20px;
  line-height: 20px;
  font-size: 25px;
  line-height: 25px;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin-left: 0 !important;
  margin-bottom: 10px;
}
</style>