11
WXL
2024-08-14 0ac2d43fce4d74f6eea5a51a2e16af4e6a536c7c
src/views/project/fund/performanceApply/index.vue
@@ -1,98 +1,246 @@
<!--  -->
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
      <el-row align="left">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      label-width="70px"
    >
      <el-row align="left">
        <el-col :span="5">
          <el-form-item label="审批状态" prop="CHECKFLAG" style="float: left">
            <el-select v-model="queryParams.CHECKFLAG" placeholder="请选择" style="width: 100%">
              <el-option v-for="item in checkFlagOptions" :key="item.value" :label="item.label" :value="item.value">
            <el-select
              v-model="queryParams.CHECKFLAG"
              placeholder="请选择"
              style="width: 100%"
            >
              <el-option
                v-for="item in checkFlagOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="申请金额" prop="money" style="float: left">
            <el-input v-model="queryParams.money" placeholder="请输入申请人金额" clearable size="small"
              @keyup.enter.native="handleQuery" />
            <el-input
              v-model="queryParams.money"
              placeholder="请输入申请人金额"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="经办人" prop="name">
            <el-input v-model="queryParams.name" placeholder="请输入经办人" clearable size="small"
              @keyup.enter.native="handleQuery" />
            <el-input
              v-model="queryParams.name"
              placeholder="请输入经办人"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
      <el-row>
        <el-col :span="7">
          <el-form-item label="申请日期" prop="applyTime">
            <el-date-picker format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="value1" type="daterange" @blur="onpick"
              range-separator="至" start-placeholder="报销申请开始日期" end-placeholder="报销申请结束日期"
              @keyup.enter.native="handleQuery">
            <el-date-picker
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              v-model="queryParams.value1"
              type="daterange"
              range-separator="至"
              start-placeholder="报销申请开始日期"
              end-placeholder="报销申请结束日期"
              @keyup.enter.native="handleQuery"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          <el-button
            type="primary"
            icon="el-icon-search"
            size="mini"
            @click="handleQuery"
            >搜索</el-button
          >
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
            >重置</el-button
          >
        </el-col>
      </el-row>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          >新增</el-button
        >
        <!-- v-hasPermi="['project:medicalfund:add']" -->
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading"
          @click="handleExport">导出</el-button>
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          :loading="exportLoading"
          @click="handleExport"
          >导出</el-button
        >
      </el-col>
      <!-- v-hasPermi="['project:medicalfund:export']" -->
      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
    </el-row>
    <el-table v-loading="loading" border :data="donateconsolationfundList">
      <el-table-column label="申请日期" align="center" prop="applyTime" width="180px">
    <el-table
      v-loading="loading"
      border
      :data="donateconsolationfundList"
      :row-class-name="rowClassName"
    >
      <el-table-column
        label="申请日期"
        align="center"
        prop="applyTime"
        width="180px"
      >
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.applyTime, "{y}-{m}-{d}") }}</span>
        </template>
      </el-table-column>
      <el-table-column label="申请人" align="center" prop="username" width="150px" />
      <el-table-column label="申请金额" align="center" prop="pretaxcost" width="150px" />
      <el-table-column
        label="申请人"
        align="center"
        prop="username"
        width="150px"
      />
      <el-table-column
        label="申请金额"
        align="center"
        prop="pretaxcost"
        width="150px"
      />
      <el-table-column label="审核状态" width="150" align="center" prop="recordstatus">
      <el-table-column
        label="审核状态"
        width="150"
        align="center"
        prop="recordstatus"
      >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_recordstatus" :value="scope.row.recordstatus" />
          <dict-tag
            :options="dict.type.sys_recordstatus"
            :value="scope.row.recordstatus"
          />
        </template>
      </el-table-column>
      <el-table-column label="申请材料状态" width="140" align="center" prop="checkstatus">
      <el-table-column
        label="申请材料状态"
        width="140"
        align="center"
        prop="checkstatus"
      >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_stage_type" :value="scope.row.checkstatus" />
          <dict-tag
            :options="dict.type.sys_stage_type"
            :value="scope.row.checkstatus"
          />
        </template>
      </el-table-column>
      <el-table-column label="绩效类型" width="150" align="center" prop="performancetype">
      <el-table-column
        label="绩效类型"
        width="150"
        align="center"
        prop="performancetype"
      >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_performance_type" :value="scope.row.performancetype" />
          <dict-tag
            :options="dict.type.sys_performance_type"
            :value="scope.row.performancetype"
          />
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="280px">
      <el-table-column
        label="操作"
        fixed="right"
        align="center"
        class-name="small-padding fixed-width"
        width="280px"
      >
        <template slot-scope="scope">
          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
            icon="el-icon-edit" @click="handleup(scope.row)">上报</el-button>
          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
            icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:medicalfund:edit']">修改</el-button>
          <el-button
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleup(scope.row)"
            >上报</el-button
          >
          <el-button
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['project:medicalfund:edit']"
            >修改</el-button
          >
          <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.row)">查看</el-button>
          <el-button v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1" size="mini" type="text"
            icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['project:medicalfund:delete']">删除</el-button>
          <el-button size="mini" type="text" icon="el-icon-download" @click="mixExport(scope.row.id)"
            v-hasPermi="['project:medicalfund:download']">下载</el-button>
          <el-button size="mini" type="text" icon="el-icon-edit" @click="duplicationfn(scope.row)">复制</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleDetail(scope.row)"
            >查看</el-button
          >
          <el-button
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            @click="handleDelete(scope.row)"
            v-hasPermi="['project:medicalfund:delete']"
            ><span class="button-delete"
              ><i class="el-icon-delete"></i>删除</span
            ></el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-download"
            @click="mixExport(scope.row.id)"
            v-hasPermi="['project:medicalfund:download']"
            >下载</el-button
          >
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="duplicationfn(scope.row)"
            >复制</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>
@@ -265,8 +413,20 @@
        .then(() => {
          //查找是否存在登记完成记录
          //判断是否存在上报记录
          row.recordstatus = 0; var currenttime = new Date();
          row.applyTime = currenttime.getFullYear() + "-" + (currenttime.getMonth() + 1) + "-" + currenttime.getDate() + " " + currenttime.getHours() + ":" + currenttime.getMinutes() + ":" + currenttime.getSeconds();
          row.recordstatus = 0;
          var currenttime = new Date();
          row.applyTime =
            currenttime.getFullYear() +
            "-" +
            (currenttime.getMonth() + 1) +
            "-" +
            currenttime.getDate() +
            " " +
            currenttime.getHours() +
            ":" +
            currenttime.getMinutes() +
            ":" +
            currenttime.getSeconds();
          updateFund(row).then(response => {
            if (response.code == 200) {
              this.$message({
@@ -347,14 +507,14 @@
          this.$download.name(response.msg);
          this.exportLoading = false;
        })
        .catch(() => { });
        .catch(() => {});
    },
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm("是否确认删除该记录?")
        .then(function () {
        .then(function() {
          return delFund(ids);
        })
        .then(() => {
@@ -367,7 +527,7 @@
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
        .catch(() => {});
    },
    /** 查询列表 */
@@ -379,6 +539,7 @@
        console.log(11);
        this.loading = false;
        this.donateconsolationfundList = response.rows;
        this.total=response.total;
      });
    },
    // 捐献者医学统计打印
@@ -407,7 +568,7 @@
            console.log(url);
            const link = document.createElement("a");
            link.href = url;
            const name=fileUrl["downloadName"]
            const name = fileUrl["downloadName"];
            link.setAttribute("download", name); // 替换file.pdf为实际的文件名
            document.body.appendChild(link);
            link.click();
@@ -442,6 +603,12 @@
    mixExport(id) {
      this.dayin2(id);
      //this.totaldayin(id);
    },
    rowClassName({ row, column, rowIndex, columnIndex }) {
      if (row.recordstatus == -1 && row.backflowlevel != null) {
        return "error-row";
      }
      return "";
    }
  },
  //生命周期 - 创建完成(可以访问当前this实例)
@@ -450,17 +617,23 @@
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted() { },
  mounted() {},
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { } //如果页面有keep-alive缓存功能,这个函数会触发
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
};
</script>
<style scoped>
<style lang="scss" scoped>
/* @import url(); 引入公共css类 */
.button-delete {
  color: rgb(236, 69, 69);
}
::v-deep.el-table .error-row {
  background: #fcebeb;
}
</style>