WXL
3 天以前 4c9fdc87987140e8b2c3f0dfc2f6608cdb6be774
src/views/project/travelexpenseapply/index.vue
@@ -103,7 +103,7 @@
        <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd"
          >新增</el-button
        >
        <!-- v-hasPermi="['project:funddetail:add']" -->
        <!-- -->
      </el-col>
      <el-col :span="1.5">
        <el-button
@@ -115,7 +115,7 @@
          >导出</el-button
        >
      </el-col>
      <!-- v-hasPermi="['project:funddetail:export']" -->
      <!-- -->
      <right-toolbar
        :showSearch.sync="showSearch"
        @queryTable="getList"
@@ -217,6 +217,7 @@
        label="操作"
        align="center"
        fixed="right"
        width="300"
        class-name="small-padding fixed-width"
      >
        <template slot-scope="scope">
@@ -243,7 +244,7 @@
            @click="handleDetail(scope.row)"
            >查看</el-button
          >
          <!-- v-hasPermi="['project:funddetail:edit']" -->
          <!-- -->
          <el-button
            size="mini"
            type="text"
@@ -252,20 +253,35 @@
          >
            下载
          </el-button>
          <!-- v-hasPermi="['project:funddetail:edit']" -->
          <!-- -->
          <el-button
            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>
    <!-- v-hasPermi="['project:donateconsolationfund:edit']" -->
    <!-- -->
    <pagination
      v-show="total > 0"
@@ -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,7 +2607,7 @@
    //明显提示审批退回记录
    rowClassName({ row, column, rowIndex, columnIndex }) {
      //此判断为最后三行
      if (row.recordstatus == -1 && row.backflowlevel >= 0) {
      if (row.recordstatus == -1 && row.backflowlevel != null) {
        return "error-row";
      }
      return "";
@@ -2595,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>