spring
2025-04-11 9508c11a63737b4b9e80e1223792f07d3151c2e8
src/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue
@@ -2,27 +2,28 @@
  <div>
    <el-dialog title="数据查看" :visible.sync="isShow" width="80%" @closed="$emit('closeDataLook')">
      <ul class="tab">
        <li v-for="(m,i) in dataVisibleTitle" :key="i" :class="{active:i===dataVisibleIndex}" @click="handleDataVisibleTab(m,i)">{{m.label}}</li>
        <li v-for="(m, i) in dataVisibleTitle" :key="i" :class="{ active: i === dataVisibleIndex }"
          @click="handleDataVisibleTab(m, i)">{{ m.label }}</li>
      </ul>
      <div>
        <lims-table :tableData="tableData" :column="column"
                    @pagination="pagination" height="500px" key="tableData"
                    :page="page" :tableLoading="tableLoading"></lims-table>
        <lims-table :tableData="tableData" :column="column" @pagination="pagination" height="500px" key="tableData"
          :page="page" :tableLoading="tableLoading"></lims-table>
      </div>
    </el-dialog>
    <un-pass-retest-result :retestVisible="retestVisible" :retestInfo="retestInfo" @closeRetestLook="closeRetestLook" v-if="retestVisible"></un-pass-retest-result>
    <un-pass-retest-result :retestVisible="retestVisible" :retestInfo="retestInfo" @closeRetestLook="closeRetestLook"
      v-if="retestVisible"></un-pass-retest-result>
  </div>
</template>
<script>
import UnPassRetestResult from "./unPassRetestResult.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {getRetestResult, selectSampleAndProductByOrderId} from "@/api/business/rawMaterialOrder";
import { getRetestResult, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
export default {
  name: "dataLookVisible",
  // import 引入的组件需要注入到对象中才能使用
  components: {limsTable, UnPassRetestResult},
  components: { limsTable, UnPassRetestResult },
  props: {
    dataDialogVisible: {
      type: Boolean,
@@ -30,7 +31,7 @@
    },
    dataLookInfo: {
      type: Object,
      default: () => {}
      default: () => { }
    },
  },
  data() {
@@ -39,17 +40,17 @@
      tableData: [],
      tableLoading: false,
      column: [
        {label: '样品编号', prop: 'sampleCode'},
        {label: '样品名称', prop: 'sample'},
        {label: '检验项分类', prop: 'inspectionItemClass'},
        {label: '检验项', prop: 'inspectionItem'},
        {label: '检验子项', prop: 'inspectionItemSubclass'},
        {label: '单位', prop: 'unit'},
        {label: '样品型号', prop: 'model'},
        {label: '条件', prop: 'radius'},
        {label: '电缆标识', prop: 'cableTag'},
        {label: '试验要求', prop: 'tell'},
        {label: '检验结果', prop: 'lastValue'},
        { label: '样品编号', prop: 'sampleCode' },
        { label: '样品名称', prop: 'sample' },
        { label: '检验项分类', prop: 'inspectionItemClass' },
        { label: '检验项', prop: 'inspectionItem' },
        { label: '检验子项', prop: 'inspectionItemSubclass' },
        { label: '单位', prop: 'unit' },
        { label: '样品型号', prop: 'model' },
        { label: '试验条件', prop: 'radius' },
        { label: '电缆标识', prop: 'cableTag' },
        { label: '试验要求', prop: 'tell' },
        { label: '检验结果', prop: 'lastValue' },
        {
          dataType: 'tag',
          label: '结果判定',
@@ -72,11 +73,12 @@
              return 'danger'
            } else if (params == 3) {
              return ''
            }  else {
            } else {
              return null
            }
          }
        },
        { label: "检验人", prop: "checkUserName" },
        {
          dataType: 'action',
          fixed: 'right',
@@ -89,17 +91,17 @@
              clickFun: (row) => {
                this.getRetestResult(row);
              },
              disabled: (row, index) =>  {
                return row.insResult!==0
              disabled: (row, index) => {
                return row.insResult != 0
              }
            },
          ]
        }
      ],
      page: {
        total:0,
        size:10,
        current:1
        total: 0,
        size: 10,
        current: 1
      },
      isShow: this.dataDialogVisible,
      dataVisibleTitle: [
@@ -108,7 +110,7 @@
          value: 0
        },
        {
          label: '季度检验',
          label: '可靠性检验',
          value: 1
        },
      ],
@@ -126,7 +128,7 @@
  // 方法集合
  methods: {
    // 切换数据查看tab栏
    handleDataVisibleTab (m, i) {
    handleDataVisibleTab(m, i) {
      this.dataVisibleIndex = i
      this.refreshTable()
    },
@@ -138,7 +140,7 @@
        this.entity.id = this.dataLookInfo.quarterOrderId
      }
      this.tableLoading = true
      const params = {...this.entity}
      const params = { ...this.entity, ...this.page }
      selectSampleAndProductByOrderId(params).then(res => {
        this.tableLoading = false
        if (res.code === 200) {
@@ -149,18 +151,18 @@
        this.tableLoading = false
      })
    },
    pagination (page) {
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
    },
    // 查看不合格复测结果
    getRetestResult (row) {
      getRetestResult({insProductId: row.insProductId}).then(res => {
    getRetestResult(row) {
      getRetestResult({ insProductId: row.insProductId }).then(res => {
        this.retestVisible = true
        this.retestInfo = res.data
      })
    },
    closeRetestLook () {
    closeRetestLook() {
      this.retestVisible = false
    },
  },