yxh
3 天以前 484b1f3e41a561e438ce4cdbec0e09958c932767
src/views/project/fundstatistics/index.vue
@@ -3,147 +3,77 @@
  <div class="app-container">
    <el-col :span="24" v-if="showType == 'list'">
      <el-card shadow="never">
        <el-form :model="queryParams" ref="queryForm" :inline="true">
        <el-form class="opo-query-form" :model="queryParams" ref="queryForm" :inline="true">
          <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-form-item label="捐献进度" prop="recordstate">
            <el-select
              v-model="queryParams.recordstate"
              placeholder="请选择当前进度"
              clearable
              size="small"
            >
              <el-option
                v-for="dict in dict.type.sys_DonationStatus"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            <el-select v-model="queryParams.recordstate" placeholder="请选择当前进度" clearable size="small">
              <el-option v-for="dict in dict.type.sys_DonationStatus" :key="dict.value" :label="dict.label"
                :value="dict.value" />
            </el-select>
          </el-form-item>
          <el-form-item>
            <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-form-item>
        </el-form>
        <!-- 捐献案例列表 -->
        <el-table
          v-loading="loading"
          style="width: 1240px"
          fit
          highlight-current-row
          header-align
          border
          :data="donationCaseTableData"
        >
          <el-table-column
            label="案例时间"
            align="center"
            prop="reporttime"
            width="150"
          >
        <el-table v-loading="loading" fit highlight-current-row header-align border
          :data="donationCaseTableData">
          <el-table-column label="案例时间" align="center" prop="reporttime" width="150">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.reporttime, "{y}-{m}-{d}") }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="姓名"
            width="120"
            align="center"
            prop="name"
          />
          <el-table-column label="年龄" width="120" align="center" prop="age" />
          <el-table-column label="姓名" width="120" align="center" prop="name" />
          <el-table-column label="性别" width="120" align="center" prop="sex">
          <el-table-column label="年龄" align="center" prop="age" width="100">
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_user_sex"
                :value="scope.row.sex"
              />
              {{
                `${scope.row.age && scope.row.age !== 0
                    ? `${scope.row.age}${scope.row.ageunit}`
                    : ""
                  } ${scope.row.age2 && scope.row.age2 !== 0
                    ? `${scope.row.age2}${scope.row.ageunit2}`
                    : ""
                  }`.trim()
              }}
            </template>
          </el-table-column>
          <el-table-column
            label="专职人员"
            align="center"
            prop="reportername"
            width="100"
          />
          <el-table-column
            label="业务组"
            align="center"
            prop="treatmenthospitalname"
          />
            <template slot-scope="scope">
              <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
            </template>
          </el-table-column>
          <el-table-column label="捐献进度" align="center" prop="recordstate">
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_donornode"
                :value="scope.row.workflow"
              />
              <dict-tag :options="dict.type.sys_donornode" :value="scope.row.workflow" />
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            align="center"
            class-name="small-padding fixed-width"
            width="200"
            fixed="right"
          >
          </el-table-column> <el-table-column label="捐献医院"align="center" prop="
treatmenthospitalname
" />
          <el-table-column label="专职人员" align="center" prop="reportername"/>
          <el-table-column label="业务组" align="center" prop="deptname" />
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-download"
                @click="exportSummary(scope.row.id)"
                v-hasPermi="['project:fundstatistics:summaryexoprt']"
                >导出</el-button
              >
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="jumptocost(scope.row)"
                v-hasPermi="['project:fundstatistics:list']"
                >查看成本汇总</el-button
              >
              <el-button size="mini" type="text" icon="el-icon-download" @click="exportSummary(scope.row.id)"
                v-hasPermi="['project:fundstatistics:summaryexoprt']">导出</el-button>
              <el-button size="mini" type="text" icon="el-icon-edit" @click="jumptocost(scope.row)"
                v-hasPermi="['project:fundstatistics:list']">查看明细</el-button>
            </template>
          </el-table-column>
        </el-table>
        <!-- hide-on-single-page -->
        <pagination
          v-show="total > 0"
          style="margin-left: 100px"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getBaseInfoList"
        />
        <pagination v-show="total > 0" style="margin-left: 100px" :total="total" :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize" @pagination="getBaseInfoList" />
      </el-card>
    </el-col>
    <el-col :span="24" v-if="showType == 'costinfo'">
      <el-form :model="curCaseInfo" ref="infoForm" :inline="true">
        <el-row>
          <el-col :span="3">
            <el-button
              type="primary"
              icon="el-icon-back"
              @click="backDonateList"
              >捐献列表</el-button
            >
            <el-button type="primary" icon="el-icon-back" @click="backDonateList">捐献列表</el-button>
          </el-col>
          <el-form-item label="捐献编号" prop="donorno">
            <el-input v-model="curCaseInfo.donorno" disabled />
@@ -232,11 +162,10 @@
      });
    },
    jumptocost(row) {
      this.showType = "costinfo";
      this.curdonorno = row.id;
      this.curCaseInfo.donorno = row.donorno;
      this.curCaseInfo.name = row.name;
      //console.log("dononro:" + this.curdonorno);
      this.showType = "costinfo";
    },
    backDonateList() {
@@ -293,14 +222,14 @@
    this.getBaseInfoList();
  },
  //生命周期 - 挂载完成(可以访问DOM元素)
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  mounted() { },
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { } //如果页面有keep-alive缓存功能,这个函数会触发
};
</script>
<style scoped>