zouyu
2023-09-01 234e8f7af3e93f78e5384b64e26c2f23c659bfcc
src/views/experiment/reportAuditing/index.vue
@@ -24,13 +24,6 @@
        </el-dropdown>
      </el-form>
    </div>
    <div class="library-table">
      <div class="table-header">
        <div class="search-bar">
@@ -59,7 +52,11 @@
          :data="reportTable"
          style="width: 100%"
        >
          <el-table-column type="selection" label="" min-width="5%" />
        <el-table-column
          type="index"
          width="50">
        </el-table-column>
          <!-- <el-table-column  label="" min-width="5%" /> -->
          <el-table-column prop="materialCode" label="样品编号" min-width="10%">
            <template slot-scope="scope">
              <span style="color: #409eff">
@@ -74,15 +71,15 @@
              </span>
            </template></el-table-column
          >
          <el-table-column
          <el-table-columne
            prop="materialName"
            label="样品名称"
            min-width="10%"
          />
          <el-table-column prop="status" label="审批状态" min-width="8%">
          <el-table-column prop="status" label="审批状态" min-width="8%" v-model="Auditconclusion">
            <template slot-scope="scope">
              <span>
                <el-tag type="warning">{{
                <el-tag :color="scope.row.status == 0 ? '' : 'rgb(187, 237, 221)'" type="warning">{{
                  scope.row.status == 0 ? "待通过" : "通过"
                }}</el-tag>
              </span>
@@ -99,31 +96,23 @@
                @click="handleClick(scope.row)"
                >查看详细
              </el-button>
            <el-button  type="text" size="small" @click="checkskip = true">审核</el-button>
            <el-button  type="text" size="small" @click="shenHE(scope)">审核</el-button>
            <el-dialog
              title="原始记录审核"
              :visible.sync="checkskip"
              :visible.sync="checkskipvisible"
              width="30%"
              :before-close="handleClose">
              <el-form :model="form">
                <el-form-item label="请选择审核结果" :label-width="formLabelWidth">
                </el-form-item>
                <el-row :gutter="20">
                  <el-col :span="6" :offset="5">
                <!-- <el-button type="primary" style="background-color: rgb(208, 201, 192);">退回</el-button> -->
                <el-button style="background-color: rgb(206, 211, 216);">退回</el-button>
                  </el-col>
                  <el-col :span="6" :offset="3">
                <!-- <el-button type="primary" style="background-color: rgb(181, 237, 125);">通过</el-button> -->
                <el-button style="background-color: rgb(192, 236, 148);">通过</el-button>
                  </el-col>
                </el-row>
              >
              <el-form :model="form">
                <el-form-item label="请选择审核结果:" :label-width="formLabelWidth">
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button @click="checkskip = false">取 消</el-button>
                <el-button type="primary" @click="checkskip= false">确 定</el-button>
                <el-button @click="checkskipvisible = false">取 消</el-button>
                <el-button style="background-color: rgb(206, 211, 216);" @click="nocheckskip(scope.row)" >不通过</el-button>
                <el-button type="primary" @click="checkskip(scope.row)">通过</el-button>
              </div>
            </el-dialog>
@@ -148,27 +137,33 @@
</template>
<script>
import { selectAllReportCheck } from "@/api/experiment/reportAuditing";
import { selectAllReportCheck,checkApi } from "@/api/experiment/reportAuditing";
export default {
  data() {
    return {
      input: "",
      input: '',
      checkStatus: undefined,
      reportTable: [],
      page: 1,
      total: 0,
      pageSize: 10,
      checked: true,
      checkskip: false,
      pageSize: 8,
      checkskipvisible: false,
      form:{},
      handleClose:'',
      formLabelWidth: '120px'
      formLabelWidth: '120px',
      checked:{},
      usertt:[],
      Auditconclusion:{},
      tableRow: {},
    };
  },
  created() {
    this.getData();
  },
  methods: {
    shenHE(s){
      this.tableRow=s
      this.checkskipvisible=true
    },
    // 状态按钮
    handleRadioChange() {
      this.getData();
@@ -193,10 +188,35 @@
      this.checkStatus = undefined;
      this.getData();
    },
    //审核跳转
    // checkskip() {
    //通过
    async checkskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=1
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
      this.$message({
          message: '通过成功',
          type: 'success'
        });
    // },
    },
    //不通过
    async nocheckskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=0
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
      this.$message({
          message: '待通过',
          type: 'warning'
        });
    },
    //审核
    async transmitData(id) {
      let param={"id":id,"result":2}
     let data = await checkApi(param)
    },
    // 查询列表
    async getData() {
      const params = {