11
WXL
2023-10-12 e1d633ddeece986c1c866d4bc28e4193f3e3c41e
src/views/project/fund/medicalCostApply/index.vue
@@ -1,19 +1,38 @@
<!--  -->
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="70px">
    <el-form
      :model="queryParams"
      ref="queryForm"
      :inline="true"
      label-width="70px"
    >
      <el-row align="left">
        <el-col :span="6">
          <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-col :span="6">
          <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-col>
@@ -29,8 +48,16 @@
          </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>
@@ -44,18 +71,32 @@
              </el-row>
            </el-col>
          </el-row>
          <el-table v-loading="loading" border highlight-current-row :data="donatebaseinfoList"
            @row-click="selectDonotor">
          <el-table
            v-loading="loading"
            border
            highlight-current-row
            :data="donatebaseinfoList"
            @row-click="selectDonotor"
          >
            <!-- <el-table-column label="捐献编号" align="center" prop="donorno" /> -->
            <el-table-column label="捐献进度" align="center" prop="recordstate">
              <template slot-scope="scope">
                <dict-tag :options="dict.type.sys_DonationStatus" :value="scope.row.recordstate" />
                <dict-tag
                  :options="dict.type.sys_DonationStatus"
                  :value="scope.row.recordstate"
                />
              </template>
            </el-table-column>
            <el-table-column label="姓名" align="center" prop="name" />
          </el-table>
          <pagination v-show="total > 0" :total="total" small :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize" @pagination="getBaseInfoList" />
          <pagination
            v-show="total > 0"
            :total="total"
            small
            :page.sync="queryParams.pageNum"
            :limit.sync="queryParams.pageSize"
            @pagination="getBaseInfoList"
          />
        </el-card>
      </el-col>
      <el-col :span="18">
@@ -64,7 +105,10 @@
            <el-row :gutter="4" align="right" class="mb8">
              <el-col :span="9">
                <el-form-item label="捐献编号">
                  <el-input v-model="curCase.donorno" :disabled="true"></el-input>
                  <el-input
                    v-model="curCase.donorno"
                    :disabled="true"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="9">
@@ -76,62 +120,146 @@
            </el-row>
            <el-row :gutter="10" class="mb8">
              <el-col :span="1.5">
                <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
                  v-hasPermi="['project:medicalfund:add']">新增申请单</el-button>
                <el-button
                  type="primary"
                  plain
                  icon="el-icon-plus"
                  size="mini"
                  @click="handleAdd"
                  v-hasPermi="['project:medicalfund:add']"
                  >新增申请单</el-button
                >
              </el-col>
            </el-row>
            <el-row>
              <el-table v-loading="loading" border :data="donateconsolationfundList">
                <el-table-column label="申请日期" align="center" prop="createTime" width="150px">
              <el-table
                v-loading="loading"
                border
                :data="donateconsolationfundList"
              >
                <el-table-column
                  label="申请日期"
                  align="center"
                  prop="createTime"
                  width="150px"
                >
                  <template slot-scope="scope">
                    <span>{{
                      parseTime(scope.row.createTime, "{y}-{m}-{d}")
                    }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="申请人" align="center" prop="username" width="120px" />
                <el-table-column label="申请金额" align="center" prop="pretaxcost" width="200px" />
                <el-table-column label="所属组别" align="center" prop="deptmentname" width="220px" />
                <el-table-column label="组长" align="center" prop="managername" width="200px" />
                <el-table-column label="审核状态" align="center" prop="recordstatus">
                <el-table-column
                  label="申请人"
                  align="center"
                  prop="username"
                  width="120px"
                />
                <el-table-column
                  label="申请金额"
                  align="center"
                  prop="pretaxcost"
                  width="200px"
                />
                <el-table-column
                  label="所属组别"
                  align="center"
                  prop="deptmentname"
                  width="220px"
                />
                <el-table-column
                  label="组长"
                  align="center"
                  prop="managername"
                  width="200px"
                />
                <el-table-column
                  label="审核状态"
                  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"
      >
        <template slot-scope="scope">
          <dict-tag
            :options="dict.type.sys_stage_type"
            :value="scope.row.checkstatus"
          />
        </template>
      </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"
                    />
                  </template>
                </el-table-column>
                <!--
                  <el-table-column label="联系电话" align="center" prop="phone" width="150px" />
                <el-table-column label="工作单位" align="center" prop="unitname" width="150px" />
                -->
                <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 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
                      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
                    >
                  </template>
                </el-table-column>
              </el-table>
@@ -140,7 +268,6 @@
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>
@@ -351,13 +478,13 @@
    this.getUsermsg();
  },
  beforeCreate() { }, //生命周期 - 创建之前
  beforeMount() { }, //生命周期 - 挂载之前
  beforeUpdate() { }, //生命周期 - 更新之前
  updated() { }, //生命周期 - 更新之后
  beforeDestroy() { }, //生命周期 - 销毁之前
  destroyed() { }, //生命周期 - 销毁完成
  activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  //方法集合
  methods: {
@@ -407,7 +534,9 @@
      } else {
        const h = this.$createElement;
        this.$message({
          message: h("p", null, [h("span", null, "请在左边的捐献案例表选择需要操作的案例!")]),
          message: h("p", null, [
            h("span", null, "请在左边的捐献案例表选择需要操作的案例!")
          ])
        });
      }
      return;
@@ -469,8 +598,8 @@
        //附件处理
        this.fileList = this.form.annexbankcard
          ? this.form.annexbankcard
            .split(",")
            .map(item => ({ url: item, name: item }))
              .split(",")
              .map(item => ({ url: item, name: item }))
          : [];
        getownFundDetail(id).then(async res => {
@@ -516,8 +645,8 @@
        //附件处理
        this.fileList = this.form.annexbankcard
          ? this.form.annexbankcard
            .split(",")
            .map(item => ({ url: item, name: item }))
              .split(",")
              .map(item => ({ url: item, name: item }))
          : [];
        listFundflow(listFundflowparams).then(res => {
@@ -545,7 +674,7 @@
      const ids = row.id || this.ids;
      this.$modal
        .confirm("是否确认删除该记录?")
        .then(function () {
        .then(function() {
          return delFund(ids);
        })
        .then(() => {
@@ -559,7 +688,7 @@
          this.getfundList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => { });
        .catch(() => {});
    },
    /** 上报按钮操作 */
@@ -933,9 +1062,9 @@
                  tempData.itemid = tempItemArr[itemIndex].id;
                }
                if (tempData.id > 0) {
                  updateFunddetail(tempData).then(response2 => { });
                  updateFunddetail(tempData).then(response2 => {});
                } else {
                  addFunddetail(tempData).then(response2 => { });
                  addFunddetail(tempData).then(response2 => {});
                }
              }
            });
@@ -1226,7 +1355,7 @@
    },
    //文件上传
    handleUploadError() { },
    handleUploadError() {},
    handleremove(file) {
      this.fileList.splice(this.fileList.indexOf(file), 1);