11
WXL
2023-09-12 6d31fc90235ee89a8c70ab95c71eafca9b2f3732
src/views/project/fund/applyDetail/index.vue
@@ -164,7 +164,7 @@
          >
          </el-alert>
        </el-row>
        <el-row>
        <el-row v-if="businessType == 2">
          <div style="margin-bottom: 15px;">
            <el-button
              type="success"
@@ -402,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
@@ -430,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"
@@ -887,7 +869,7 @@
                ref="beneficiaryname"
                default-first-option
                @change="bbaaccss"
                v-model="funddetailForm.beneficiaryname"
                v-model="Personnelforname"
                placeholder="请选择"
                style="width: 100%"
              >
@@ -904,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
@@ -1044,6 +1026,85 @@
      :visible.sync="pdfVisible"
      width="60%"
    >
      <div>
        <el-table :data="tableDatatop" style="width: 100%">
          <el-table-column
            v-if="businessType == 4"
            prop="price"
            align="center"
            label="单价"
          >
          </el-table-column>
          <el-table-column
            prop="quantity"
            align="center"
            label="数量"
            v-if="businessType == 4"
          >
          </el-table-column>
          <el-table-column prop="amount" align="center" :label="amountLabel">
          </el-table-column>
          <el-table-column
            prop="taxedamount"
            align="center"
            label="税后金额"
            v-if="
              (this.ismanager == true) &
                (form.applytype == '1' || form.applytype == '2')
            "
          >
          </el-table-column>
          <el-table-column
            prop="beneficiaryname"
            align="center"
            label="姓名"
            v-if="form.applytype == '1' || form.applytype == '2'"
          >
          </el-table-column>
          <el-table-column
            prop="unitno"
            align="center"
            label="单位名称"
            width="250"
            v-if="form.applytype != '4'"
          >
          </el-table-column>
          <el-table-column
            prop="beneficiaryname"
            align="center"
            label="单位/个人"
            width="250"
            v-if="form.applytype == '4'"
          >
          </el-table-column>
          <el-table-column
            prop="title"
            align="center"
            label="职称"
            width="120"
            v-if="form.applytype == '1' || form.applytype == '2'"
          >
          </el-table-column>
          <el-table-column
            prop="idcardno"
            align="center"
            label="身份证号"
            width="200"
            v-if="form.applytype == '1' || form.applytype == '2'"
          >
          </el-table-column>
          <el-table-column prop="depositbank" align="center" label="开户银行">
          </el-table-column>
          <el-table-column
            prop="bankcardno"
            align="center"
            label="银行帐号"
            width="210"
          >
          </el-table-column>
        </el-table>
      </div>
      <div class="pdfimg">
        <div class="box-pdf">
          <div>
@@ -1133,7 +1194,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%"
@@ -1162,7 +1223,11 @@
    </el-dialog>
    <!-- 批量选取 -->
    <el-dialog title="批量生成明细信息" :visible.sync="batchdialogVisible" width="30%">
    <el-dialog
      title="批量生成明细信息"
      :visible.sync="batchdialogVisible"
      width="30%"
    >
      <div style="max-height: 300px; overflow-y: auto">
        <el-checkbox
          :indeterminate="isIndeterminate"
@@ -1179,17 +1244,15 @@
            border
            v-for="city in cityOptions"
            :label="city"
            :key="city"
            >{{ city }}</el-checkbox
            :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="dialogVisible = false"
          >确 定</el-button
        >
        <el-button type="primary" @click="BatchentryFn">确 定</el-button>
      </span>
    </el-dialog>
  </div>
@@ -1336,50 +1399,11 @@
      Networkheader: null,
      batchdialogVisible: false,
      itemlist: [],
      cityOptions: [
        "上海",
        "北京",
        "广州",
        "深圳",
        "杭州",
        "温州",
        "河南",
        "莆田",
        "广州",
        "深圳",
        "杭州",
        "温州",
        "河南",
        "莆田",
        "广州",
        "深圳",
        "杭州",
        "温州",
        "河南",
        "莆田",
        "广州",
        "深圳",
        "杭州",
        "温州",
        "河南",
        "莆田",
        "广州",
        "深圳",
        "杭州",
        "温州",
        "河南",
        "莆田",
        "广州",
        "深圳",
        "杭州",
        "温州",
        "河南",
        "莆田",
        "福州"
      ],
      cityOptions: [],
      checkAll: false,
      checkedCities: ["上海", "北京"],
      checkedCities: [],
      Personnelforname: "请选择",
      unitforname: "请选择",
      isIndeterminate: true,
      //是否是专家费的OPO审批人员
@@ -1397,6 +1421,7 @@
      totalPreTaxAmount: 0.0,
      totalAfterTaxAmount: 0.0,
      totalAmount: 0.0,
      tableDatatop: [],
      //费用类型数组
      feeItemTypes: [],
@@ -1535,7 +1560,7 @@
      pdfimgsrcList: [],
      pdfVisible: false,
      previewpdf: false,
      hintitle: "选中左侧已上传文件预览查看",
      hintitle: "请上传文件后查看",
      atpresent: "",
      Savereminder: false, //提醒保存弹框
      Reminderquantity: 0, //提醒数量
@@ -2844,21 +2869,85 @@
      });
    },
    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() {},
    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 = {
@@ -2928,6 +3017,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) {
@@ -2961,9 +3055,6 @@
        });
      //全部删除后添加一条新行
      if (this.rbDetails.length == 1) {
        this.addRow(0);
      }
    },
    //计算总金额
@@ -3090,6 +3181,8 @@
        this.pdfimgsrcList.push(
          this.Networkheader + "/prod-api" + response.fileName
        );
        this.pdftitle = "共" + this.pdfimgsrcList.length + "项";
        this.pdfimg = this.Networkheader + "/prod-api" + response.fileName;
        this.rbDetails[this.atpresent].annexfilesList = this.fileListto;
@@ -3100,6 +3193,11 @@
    // 点击票据
    Filepopup(index, rows, row) {
      console.log(row);
      this.tableDatatop = [];
      this.pdfimgsrcList = [];
      this.tableDatatop.push(row);
      this.atpresent = index;
      this.pdfVisible = true;
      if (this.rbDetails[index].annexfilesList) {
@@ -3107,12 +3205,12 @@
        this.fileListto = this.rbDetails[index].annexfilesList;
        this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url;
        // this.pdfimg = this.fileListto[0].url;
        this.pdfimgsrcList = [];
        this.fileListto.forEach(item => {
          this.pdfimgsrcList.push(this.Networkheader + "/prod-api" + item.url);
        });
        console.log(this.pdfimgsrcList);
        console.log(this.pdfimg);
        this.pdftitle = "共" + this.pdfimgsrcList.length + "项";
      } else {
        this.fileListto = [];
        this.pdfimg = "";
@@ -3123,7 +3221,8 @@
    // 点击已上传文件
    downFile(item) {
      console.log(item);
      this.pdftitle = item.name;
      this.pdftitle =
        "共" + this.pdfimgsrcList.length + "项,当前选中" + item.name;
      let name = item.name.split(".");
      if (name[1] == "pdf") {
        this.$modal.msgWarning("当前文件暂不支持预览");
@@ -3206,7 +3305,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;
@@ -3333,7 +3443,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;