yxh
2023-12-12 e21e9ad99c4c2a306d15cb270dc41520450ac9f2
src/views/project/fundcheck/expertFeeCheck/index.vue
@@ -122,20 +122,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 +160,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,7 +169,28 @@
            <template slot-scope="scope">
              <dict-tag :options="dict.type.sys_tax" :value="scope.row.istax" />
            </template>
          </el-table-column> -->
          <el-table-column
            label="个税计算日期"
            width="120"
            align="center"
            prop="fundtaxtime"
          >
            <template slot-scope="scope">
              <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="username"
            width="150px"
          />
          <el-table-column
            label="申请日期"
            width="120"
@@ -179,24 +201,14 @@
              <span>{{ parseTime(scope.row.createTime, "{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="200px"
          />
          <el-table-column
            label="所属组别"
            align="center"
            prop="deptmentname"
            width="200px"
          />
          <el-table-column
            label="组长"
            align="center"
@@ -1316,9 +1328,20 @@
        this.ids.forEach(item => {
          if (xuanzlist.includes(item)) {
          } else {
            if (this.overallids.length == 1) {
              this.overallids = [];
            } else {
              this.overallids.splice(this.overallids.indexOf(item), 1);
            }
            if (this.overallidsvalue.length == 1) {
              this.overallidsvalue = [];
            } else {
              this.overallidsvalue.splice(
                this.overallidsvalue.indexOf(item),
                1
              );
            }
            this.ids.splice(this.ids.indexOf(item), 1);
            this.overallids.splice(this.overallids.indexOf(item), 1);
            this.overallidsvalue.splice(this.overallidsvalue.indexOf(item), 1);
          }
        });
      }
@@ -1363,28 +1386,44 @@
    },
    Totalcalculation(tot) {
      console.log(tot);
      if(this.overallids.length == 0) {
        this.$message({
            type: "info",
            message: "当前没有选择要汇总的专家费申请单,不能汇总!"
          });
        return;}
      let bojite = {
        fundids: this.overallids,
        isTaxAfter: tot
      };
      if (tot == 0) {
        TotalcalculationFn(bojite).then(row => {
          if ((row.code = 200)) {
            this.$modal.msgSuccess(row.msg);
          } else {
            this.$modal.msgError(row.msg);
          }
        });
        TotalcalculationFn(bojite)
          .then(row => {
            if (row.code == 200) {
              this.$modal.msgSuccess(row.msg);
            } else {
              console.log(123);
              this.$modal.msgError(row.msg);
            }
          })
          .catch(error => {
            this.$modal.msgError(error);
          });
      } else {
        const hasValue = this.overallidsvalue.every(obj => obj.istax == 1);
        if (hasValue) {
          TotalcalculationFn(bojite).then(row => {
            if ((row.code = 200)) {
              this.$modal.msgSuccess(row.msg);
            } else {
              this.$modal.msgError(row.msg);
            }
          });
          TotalcalculationFn(bojite)
            .then(row => {
              if (row.code == 200) {
                this.$modal.msgSuccess(row.msg);
              } else {
                this.$modal.msgError(row.msg);
              }
            })
            .catch(error => {
              this.$modal.msgError(error);
            });
        } else {
          this.$modal.msgError("请选择算税后的数据进行合并计算");
        }