11
WXL
2024-08-14 0ac2d43fce4d74f6eea5a51a2e16af4e6a536c7c
src/views/project/fundcheck/expertFeeCheck/index.vue
@@ -8,42 +8,32 @@
      label-width="80px"
    >
      <el-row>
        <el-col :span="8">
          <el-form-item label="申请日期" prop="createTime">
            <el-date-picker
              format="yyyy-MM-dd"
              @change="selectapplication"
              value-format="yyyy-MM-dd"
              v-model="createTime"
              type="daterange"
              range-separator="至"
              start-placeholder="申请开始日期"
              end-placeholder="申请结束日期"
        <el-col :span="5">
          <el-form-item label="捐献案例" prop="donorname" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="预审状态" prop="checkstatus" style="float: left">
            <el-select
              v-model="queryParams.checkstatus"
              placeholder="请选择"
              style="width: 100%"
            >
            </el-date-picker>
          </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="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="经办人" prop="APPLICANT" style="float: left">
            <el-input
              v-model="queryParams.APPLICANT"
              placeholder="请输入申请人姓名"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
              <el-option
                v-for="item in checkmaterials"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="5">
@@ -61,48 +51,48 @@
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <!-- <el-col :span="6">
          <el-button type="primary" icon="el-icon-search" size="mini" @click="flowconclusion">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-col> -->
      </el-row>
      <el-row>
        <el-col :span="5">
          <el-form-item
            label-width="120px"
            label="申请材料状态"
            prop="checkstatus"
            style="float: left"
          >
            <el-select
              v-model="queryParams.checkstatus"
              placeholder="请选择"
              style="width: 100%"
            >
              <el-option
                v-for="item in checkmaterials"
                :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="donorname" style="float: left">
          </el-form-item> </el-col
        ><el-col :span="5">
          <el-form-item label="经办人" prop="APPLICANT" style="float: left">
            <el-input
              v-model="queryParams.donorname"
              placeholder="请输入申请人捐献者"
              v-model="queryParams.APPLICANT"
              placeholder="请输入申请人姓名"
              clearable
              size="small"
              @keyup.enter.native="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="3">
      </el-row>
      <el-row>
        <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="flowconclusion"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="申请日期" prop="createTime">
            <el-date-picker
              format="yyyy-MM-dd"
              @change="selectapplication"
              value-format="yyyy-MM-dd"
              v-model="createTime"
              type="daterange"
              range-separator="至"
              start-placeholder="申请开始日期"
              end-placeholder="申请结束日期"
              @keyup.enter.native="flowconclusion"
            >
            </el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <div style="margin-bottom: 15px;">
            <el-button
              type="primary"
@@ -122,20 +112,21 @@
      <el-col :span="8">
        <div style="margin-bottom: 15px;">
          <el-button
            icon="el-icon-remove-outline"
            type="success"
            plain
            size="mini"
            :disabled="true"
            @click="Totalcalculation(0)"
            >个税前汇总</el-button
          >
          <el-button
            type="primary"
            plain
            icon="el-icon-circle-check"
            size="mini"
            @click="Totalcalculation(1)"
            >计税后合计</el-button
          >
          <el-button
            icon="el-icon-remove-outline"
            type="success"
            plain
            size="mini"
            @click="Totalcalculation(0)"
            >计税前合计</el-button
            >个税后汇总</el-button
          >
        </div>
      </el-col>
@@ -159,8 +150,8 @@
          </el-table-column>
          -->
          <el-table-column type="selection" width="45"> </el-table-column>
          <el-table-column
            label="个税计算情况"
          <!-- <el-table-column
            label="个税计算"
            align="center"
            prop="recordstatus"
            width="200"
@@ -168,23 +159,23 @@
            <template slot-scope="scope">
              <dict-tag :options="dict.type.sys_tax" :value="scope.row.istax" />
            </template>
          </el-table-column>
          </el-table-column> -->
          <el-table-column
            label="报销单号"
            align="center"
            prop="bh"
            width="150px"
          />
          <el-table-column
            label="申请日期"
            width="120"
            align="center"
            prop="createTime"
            prop="applyTime"
          >
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
              <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"
@@ -192,15 +183,9 @@
            width="200px"
          />
          <el-table-column
            label="所属组别"
            label="经办人"
            align="center"
            prop="deptmentname"
            width="200px"
          />
          <el-table-column
            label="组长"
            align="center"
            prop="managername"
            prop="username"
            width="150px"
          />
          <!-- <el-table-column label="工作单位" align="center"  prop="unitname" width="230px" /> -->
@@ -208,6 +193,19 @@
          <!-- <el-table-column label="税后金额" align="center" prop="taxedcost" width="120px" />
          <el-table-column label="申请金额" align="center" prop="amountrequested" width="120px" />
          <el-table-column label="预支费用" align="center" prop="prepaidamount" width="120px" /> -->
          <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"
@@ -222,18 +220,27 @@
            </template>
          </el-table-column>
          <el-table-column
            label="申请材料状态"
            width="140"
            label="个税计算日期"
            width="120"
            align="center"
            prop="checkstatus"
            prop="fundtaxtime"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.sys_stage_type"
                :value="scope.row.checkstatus"
              />
              <span>{{ parseTime(scope.row.fundtaxtime, "{y}-{m}-{d}") }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="所属组别"
            align="center"
            prop="deptmentname"
            width="200px"
          />
          <el-table-column
            label="组长"
            align="center"
            prop="managername"
            width="150px"
          />
          <el-table-column
            label="捐献者"
            align="center"
@@ -273,7 +280,7 @@
                size="mini"
                type="text"
                icon="el-icon-download"
                @click="dayin(scope.row.id)"
                @click="totaldayin(scope.row.id)"
                >下载</el-button
              >
            </template>
@@ -430,7 +437,7 @@
                <el-option v-for="dict in dict.type.sys_recordstatus" :key="dict.value" :label="dict.label"
                  :value="dict.value" />
              </el-select>
            </el-form-item>
            </el-form-item>
          </el-col>-->
        </el-row>
        <el-row>
@@ -821,6 +828,7 @@
import Li_area_select from "@/components/Address";
import OrgSelecter from "@/views/project/components/orgselect";
import { setItem, grtItem, removeItem } from "@/utils/storage.js";
import { getToken } from "@/utils/auth";
export default {
  components: {
@@ -1004,7 +1012,10 @@
      approveLevel: 5,
      show: 0,
      fundtypeArrAll: [],
      dialogType: "show"
      dialogType: "show",
      headers: {
        Authorization: "Bearer " + getToken()
      }
    };
  },
  watch: {},
@@ -1030,9 +1041,6 @@
  methods: {
    getUsermsg() {
      getUserProfile().then(response => {
        console.log("登录用户信息", response.data);
        // this.defaultperson = response.data;
        // this.standardlevel = response.data.standardlevel;
        if (
          response.data.userName === "001" ||
          response.data.userName === "002" ||
@@ -1043,18 +1051,15 @@
        } else {
          this.show = 3;
        }
        console.log(response.data.userName, this.show);
      });
    },
    selectapplication() {
      console.log("时间", this.createTime);
      this.queryParams.APPLICATIONBEGTIME = this.createTime[0];
      this.queryParams.APPLICATIONENDTIME = this.createTime[1];
    },
    getlistbypower() {
      this.loading = true;
      listbypower(this.queryParams).then(res => {
        console.log("根据权限显示列表", res);
        removeItem("expertFeeCheck");
        setItem("expertFeeCheck", this.queryParams);
        this.loading = false;
@@ -1082,11 +1087,18 @@
        return;
      }
      checkfund(checkfundobj).then(res => {
        console.log("审核费用", res);
        this.reset();
        this.$modal.msgSuccess("审核完成!");
        this.getlistbypower();
        this.dialogOpen = false;
        if (res.code == 200) {
          this.reset();
          this.$modal.msgSuccess("审核完成!");
          this.getlistbypower();
          this.dialogOpen = false;
        } else {
          if (res.msg) {
            this.$modal.msgError("操作失误");
          } else {
            this.$modal.msgError(res.msg);
          }
        }
      });
    },
    getlistUser() {
@@ -1128,23 +1140,36 @@
    totaldayin(e) {
      // const id =this.row.id
      getdownloadBX(e).then(res => {
        if (res.downloadUrl) {
          var fileUrl = res;
          //获取当前网址
          var urlBase = process.env.VUE_APP_BASE_API;
          var curWWWPath = window.document.location.href;
          var pos = curWWWPath.indexOf(window.document.location.pathname);
          // 创建a标签
          var aEle = document.createElement("a");
          aEle.href =
            curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
          aEle.click();
          this.$alert("下载成功", "提示", {
            confirmButtonText: "确定",
            type: "success"
      getdownloadLW(e).then(res => {
        var fileUrl = res;
        //获取当前网址
        var urlBase = process.env.VUE_APP_BASE_API;
        var curWWWPath = window.document.location.href;
        var pos = curWWWPath.indexOf(window.document.location.pathname);
        // 创建a标签
        var aEle = document.createElement("a");
        aEle.href =
          curWWWPath.substring(0, pos) + urlBase + fileUrl["downloadUrl"];
        console.log(aEle.href);
        // 添加Authorization头部
        fetch(aEle.href, {
          headers: this.headers
        })
          .then(response => {
            // 将文件下载链接作为blob对象进行下载
            return response.blob();
          })
          .then(blob => {
            const url = window.URL.createObjectURL(new Blob([blob]));
            console.log(url);
            const link = document.createElement("a");
            link.href = url;
            const name = fileUrl["downloadName"];
            link.setAttribute("download", name); // 替换file.pdf为实际的文件名
            document.body.appendChild(link);
            link.click();
            link.parentNode.removeChild(link);
          });
        }
      });
    },
@@ -1219,14 +1244,10 @@
    change(scope) {},
    autodonorno() {
      listDonatebaseinfo().then(res => {
        // console.log("所有捐献者列表:",res);
        res.rows.forEach(data => {
          // console.log("data:",data);
          if (this.form.doname === data.name) {
            this.form.donorno = data.donorno;
            console.log(this.form.donorno);
          } else {
            // this.$modal.alertWarning("对不起,无该捐献人");
          }
        });
      });
@@ -1333,39 +1354,32 @@
          }
        });
      }
      console.log(this.ids);
      this.ids.forEach(item => {
        if (this.overallids.includes(item)) {
          console.log("3 is in the array");
        } else {
          this.overallids.push(item);
          const obj = selection.find(obj => obj.id === item);
          this.overallidsvalue.push(obj);
        }
      });
      console.log(this.overallids);
    },
    // 切换页后恢复选中
    Restorecheck() {
      console.log(this.donateconsolationfundList);
      console.log(this.overallids);
      const overlap = this.donateconsolationfundList.filter(value => {
        return this.overallids.includes(value.id);
      });
      // 保持ids和当前页面的同步性
      this.ids = overlap.map(item => item.id);
      console.log(overlap, "当前页选中数据");
      this.toggleSelection(overlap);
    },
    // 挂载选择状态
    toggleSelection(rows) {
      console.log(rows);
      if (rows) {
        this.$nextTick(() => {
          rows.forEach(row => {
            console.log(row);
            this.$refs.multipleTable.toggleRowSelection(row, true);
            console.log(1);
          });
        });
      } else {
@@ -1373,7 +1387,14 @@
      }
    },
    Totalcalculation(tot) {
      console.log(tot);
      if (this.overallids.length == 0) {
        this.$message({
          type: "info",
          message: "当前没有选择要汇总的专家费申请单,不能汇总!"
        });
        return;
      }
      let bojite = {
        fundids: this.overallids,
        isTaxAfter: tot
@@ -1384,7 +1405,6 @@
            if (row.code == 200) {
              this.$modal.msgSuccess(row.msg);
            } else {
              console.log(123);
              this.$modal.msgError(row.msg);
            }
          })
@@ -1412,7 +1432,6 @@
    },
    /** 新增按钮操作 */
    handleAdd() {
      console.log("222", this.curCase);
      if (this.curCase.id) {
        this.istrue += 2;
        this.reset();
@@ -1472,7 +1491,6 @@
        this.loading = false;
        this.form = response.data;
        this.form.name = this.curCase.name;
        console.log("wdadwadwadaw", this.form);
        this.loading = true;
        getownFundDetail(this.form.id).then(res => {
          this.loading = false;
@@ -1489,7 +1507,6 @@
        fundtype: 2
      };
      listFundflow(listFundflowparams).then(res => {
        console.log(" fundtype: 1", res);
        this.fundflowList = res.rows;
      });
      this.dialogOpen = true;
@@ -1527,7 +1544,6 @@
      getFund(row.id).then(response => {
        this.form = response.data;
        this.form.name = this.curCase.name;
        console.log("applytype", this.form.applytype);
        getownFundDetail(row.id).then(res => {
          this.fundDetailArr = res.data;
          for (let m = 0; m < this.fundDetailArr.length; m++) {
@@ -1652,16 +1668,9 @@
                  this.$set(rows, rows.splice(index, 1));
                  getownFundDetail(this.form.id).then(res => {
                    this.$set(this.fundDetailArr, res.data);
                    // this.fundDetailArr = res.data
                    // console.log('删除后',this.fundDetailArr)
                  });
                });
              }
              // getownFundDetail(this.form.id).then(res=>{
              // this.$set(this.fundDetailArr,res.data)
              // this.fundDetailArr = res.data
              // console.log('删除后',this.fundDetailArr)
              // })
            });
          } else {
            rows.splice(index, 1);
@@ -1739,9 +1748,7 @@
        type: "warning"
      })
        .then(() => {
          updateFunddetail(this.fundDetailArr).then(res => {
            console.log("牛丸牛啊", res);
          });
          updateFunddetail(this.fundDetailArr).then(res => {});
        })
        .catch(() => {
          //几点取消的提示
@@ -1753,10 +1760,8 @@
      //判断数据明细数据是否正确
      let detailDataCorrect = true;
      for (let i = 0; i < this.applicationDetailArr.length; i++) {
        // console.log('qqq',this.applicationDetailArr[i]);
        let tempData = this.applicationDetailArr[i];
        Object.keys(tempData).forEach(function(key) {
          // console.log('iii',key, tempData[key]);
          if (
            tempData[key] == null ||
            tempData[key] == undefined ||
@@ -1794,7 +1799,6 @@
    //获取费用类型
    getCurFundType() {
      getFundTypeAll(1).then(res => {
        console.log("费用类型", res.data);
        let dataList = res.data;
        this.fundtypeArrAll = dataList;
        this.fundtypeArr = [];
@@ -1828,7 +1832,6 @@
        listReportname(arr[i]).then(res => {
          this.arrr2 = res.data;
          this.arrr3 = this.arrr3.concat(this.arrr2);
          console.log("adadadadasdsad", this.arrr3, this.userlist);
        });
      }
    },
@@ -1911,7 +1914,6 @@
    dayin0() {
      if (this.form.id) {
        const id = this.form.id;
        console.log(id);
        getdownloadLW(id).then(res => {
          if (res.downloadUrl) {
            var fileUrl = res;
@@ -2026,9 +2028,6 @@
    },
    dayin4() {
      const id = this.form.id;
      // getdownloadLL(id).then(res=>{
      //   console.log('劳务下载',res);
      // })
    },
    // 捐献者家属交通食宿打印
    dayin5() {
@@ -2051,7 +2050,6 @@
              type: "success"
            });
          }
          console.log("家属伙食交通费", res);
        });
      } else {
        this.$alert("请确认您要下载的专家劳务表", "提醒", {