王震
2023-08-23 2c0a14426d5fd2977995137a0f887947c5478055
src/views/experiment/reportAuditing/index.vue
@@ -59,7 +59,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">
@@ -79,7 +83,7 @@
            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">{{
@@ -99,31 +103,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 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>
              <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 +144,36 @@
</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,
      checkskipvisible: false,
      form:{},
      handleClose:'',
      formLabelWidth: '120px'
      // handleClose:{},
      formLabelWidth: '120px',
      checked:{},
      usertt:[],
      Auditconclusion:{},
      tableRow: {},
    };
  },
  created() {
    this.getData();
  },
  methods: {
    shenHE(s){
      this.tableRow=s
      this.checkskipvisible=true
    },
    // 状态按钮
    handleRadioChange() {
      this.getData();
@@ -193,10 +198,27 @@
      this.checkStatus = undefined;
      this.getData();
    },
    //审核跳转
    // checkskip() {
    //通过
    async checkskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=2
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
    // },
    },
    //不通过
    async nocheckskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=0
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
    },
    //审核
    async transmitData(id) {
      let param={"id":id,"result":1}
     let data = await checkApi(param)
    },
    // 查询列表
    async getData() {
      const params = {