Fixiaobai
2023-09-19 88859106604b03bed968f2f55508e3a5b83f4ce9
src/components/view/rawUnqualified/raw.vue
@@ -15,7 +15,7 @@
          <el-input
            size="small"
            v-model="search.productName"
            style="width: 224px;margin-right: 30px;"
            style="width: 14vw;margin-right: 5px;"
            placeholder="请输入"
            clearable
          ></el-input>
@@ -24,7 +24,7 @@
            v-model="search.formTime"
            size="small"
            placeholder="请输入"
            style="width: 224px;margin-right: 30px;"
            style="width: 12vw"
            clearable
            value-format="yyyy-MM-dd"
          ></el-date-picker>
@@ -33,7 +33,7 @@
            v-model="search.processingStatus"
            size="small"
            placeholder="请选择"
            style="width: 224px;margin-right: 30px;"
            style="width: 12vw"
          >
            <el-option label="已处理" :value="1"></el-option>
            <el-option label="待处理" :value="0"></el-option>
@@ -42,7 +42,7 @@
          <el-input
            size="small"
            v-model="search.supplier"
            style="width: 224px;margin-right: 20px;"
            style="width: 12vw"
            placeholder="请输入"
          ></el-input>
          <el-button size="mini" @click="clean()"><span>重 置</span></el-button>
@@ -71,7 +71,7 @@
        >
          <el-table-column type="selection" width="50"> </el-table-column>
          <el-table-column type="index" label="序号" width="60">
            <template scope="scope">
            <template slot-scope="scope">
              {{ (search.pageSize - 1) * search.countSize + scope.$index + 1 }}
            </template>
          </el-table-column>
@@ -86,7 +86,7 @@
          >
          </el-table-column>
          <el-table-column prop="code" label="材料编码"> </el-table-column>
          <el-table-column prop="id" label="材料名称"> </el-table-column>
          <el-table-column prop="name" label="材料名称"> </el-table-column>
          <el-table-column prop="specifications" label="规格型号">
          </el-table-column>
          <el-table-column prop="unit" label="单位"> </el-table-column>
@@ -108,25 +108,61 @@
          </el-table-column>
          <el-table-column prop="deal_reasult" label="处理结果" width="100">
            <template slot-scope="scope">
              <span style="color:#34BD66;" v-if="scope.row.deal_reasult == 1"
              <span style="color:#E84738;" v-if="scope.row.deal_reasult == 0"
                >不通过</span
              >
              <span
                style="color:#E84738;"
                v-else-if="scope.row.deal_reasult == 0"
                style="color:#34BD66;"
                v-else-if="scope.row.deal_reasult == 1"
                >通过</span
              >
            </template>
          </el-table-column>
          <el-table-column label="操作" width="100">
            <template>
            <template slot-scope="scope">
              <div style="display: flex;">
                <el-button type="text" siae="small" size="mini">评审</el-button>
                <el-popover
                  placement="left"
                  width="160"
                  :ref="`popover-${scope.$index}`"
                >
                  <div style="padding: 6px">评审是否通过?</div>
                  <div style="text-align: right; margin: 6px;">
                    <el-button
                      size="mini"
                      type="text"
                      style="color: #E84738;"
                      @click="
                        scope._self.$refs[`popover-${scope.$index}`].doClose();
                        rawEvaluate(scope.row, 0);
                      "
                      >不通过</el-button
                    >
                    <el-button
                      type="text"
                      style="color: #34bd66;"
                      size="mini"
                      @click="
                        scope._self.$refs[`popover-${scope.$index}`].doClose();
                        rawEvaluate(scope.row, 1);
                      "
                      >通过</el-button
                    >
                  </div>
                  <el-button
                    slot="reference"
                    type="text"
                    siae="small"
                    size="mini"
                    >评审</el-button
                  >
                </el-popover>
                <el-button
                  type="text"
                  siae="small"
                  size="mini"
                  style=" color:87, 138, 193 ;"
                  style=" color:87, 138, 193 ; margin-left: 10px;"
                  >查看</el-button
                >
              </div>
@@ -165,7 +201,8 @@
        supplier: "" // 供应商
      },
      unqualifiedTable: [], // 页面表格数据
      total: 0
      total: 0,
      visible: false
    };
  },
  mounted() {
@@ -200,6 +237,18 @@
        supplier: "" // 供应商
      };
      this.getDetailInfo();
    },
    rawEvaluate(row, passOrNo) {
      this.$axios
        .post(this.$api.url.evaluatePassOrNo, {
          rawId: row.id,
          passOrNo: passOrNo
        })
        .then(res => {
          this.unqualifiedTable = [];
          this.getDetailInfo();
          this.$parent.removeAllTab()
        });
    }
  }
};