11
WXL
2024-07-17 21fe2968337eb8eab97adc88750b71c4057e98f8
src/views/project/travelexpenseapply/index.vue
@@ -217,6 +217,7 @@
        label="操作"
        align="center"
        fixed="right"
        width="300"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
@@ -257,11 +258,26 @@
            v-if="scope.row.recordstatus == -1 || scope.row.recordstatus == 1"
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            >删除</el-button
            ><span class="button-delete"
              ><i class="el-icon-delete"></i>删除</span
            ></el-button
          >
          <!-- v-hasPermi="['project:funddetail:remove']" -->
        </template>
      </el-table-column>
      <el-table-column fixed="right" align="center" width="120" label="功能">
        <template slot-scope="scope">
          <el-button size="mini" v-if="scope.row.uploadStates == 1"
            >线下已报销</el-button
          >
          <el-button
            size="mini"
            type="success"
            v-else-if="scope.row.uploadStates == 0"
            @click="Dooffline('1', scope.row)"
            >线下报销</el-button
          >
        </template>
      </el-table-column>
    </el-table>
@@ -1258,6 +1274,7 @@
import { getUser, getUserProfile } from "@/api/system/user";
import { treeselect } from "@/api/system/dept";
import { getSubsidy } from "@/api/project/travelcity";
import { addorupdateFund } from "@/api/project/fund";
import { listReportname, listUser } from "@/api/project/organization";
import { getToken } from "@/utils/auth";
export default {
@@ -1448,6 +1465,17 @@
    handleExceed() {
      this.$message.error(`上传文件数量不能超过 ${5} 个!`);
    },
    Dooffline(a, value) {
      value.uploadStates = 1;
      value.notes = "线下已报销";
      addorupdateFund(value).then(res => {
        if (res.code == 200) {
          this.$modal.msgSuccess("记录成功");
        } else {
          this.$modal.msgError(res.msg);
        }
      });
    },
    //文件上传成功回调
@@ -2579,8 +2607,7 @@
    //明显提示审批退回记录
    rowClassName({ row, column, rowIndex, columnIndex }) {
      //此判断为最后三行
      if (row.recordstatus == -1 && row.backflowlevel != 0) {
        console.log("上色");
      if (row.recordstatus == -1 && row.backflowlevel != null) {
        return "error-row";
      }
      return "";
@@ -2596,7 +2623,10 @@
  background: #e8f4ff !important;
  /* color:whitesmoke; */
}
.button-delete {
  color: rgb(236, 69, 69);
}
::v-deep.el-table .error-row {
  background: #FCEBEB;
  background: #fcebeb;
}
</style>