liding
2026-09-20 2b2fa317c30ee2de7a8b6f5fc964532031adea66
src/views/business/inspectionReview/index.vue
@@ -4,20 +4,20 @@
      <el-form :model="entity" ref="entity" size="small" :inline="true">
        <el-form-item label="委托编号" prop="entrustCode">
          <el-input size="small" placeholder="请输入" clearable v-model="entity.entrustCode"
            @keyup.enter.native="refreshTable()"></el-input>
                    @keyup.enter.native="refreshTable()"></el-input>
        </el-form-item>
<!--        <el-form-item label="下单类别" prop="entrustCode">-->
<!--          <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()">-->
<!--            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="物料属性" prop="materialProp">-->
<!--          <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%">-->
<!--            <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"-->
<!--                       :value="dict.value">-->
<!--            </el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <!--        <el-form-item label="下单类别" prop="entrustCode">-->
        <!--          <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()">-->
        <!--            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>-->
        <!--          </el-select>-->
        <!--        </el-form-item>-->
        <!--        <el-form-item label="物料属性" prop="materialProp">-->
        <!--          <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%">-->
        <!--            <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"-->
        <!--                       :value="dict.value">-->
        <!--            </el-option>-->
        <!--          </el-select>-->
        <!--        </el-form-item>-->
        <el-form-item>
          <el-button type="primary" size="mini" @click="refreshTable">查询</el-button>
          <el-button size="mini" @click="refresh">重置</el-button>
@@ -35,30 +35,30 @@
    </div>
    <!--报告查看-->
    <el-dialog title="报告查看" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
      :fullscreen="fullscreen">
               :fullscreen="fullscreen">
      <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
          v-if="!fullscreen"></i>
           v-if="!fullscreen"></i>
        <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
      </div>
      <div style="height: 80vh;" v-if="issuedVisible">
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;"/>
      </div>
    </el-dialog>
    <el-dialog title="查看附件" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen>
      <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}"
        style="max-height: 90vh;overflow-y: auto;" />
                   style="max-height: 90vh;overflow-y: auto;"/>
    </el-dialog>
  </div>
</template>
<script>
import { getYearAndMonthAndDays } from "@/utils/date";
import {getYearAndMonthAndDays} from "@/utils/date";
import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
import limsTable from "@/components/Table/lims-table.vue";
import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "vuex";
import { upReportUrl } from "@/api/business/insReport";
import {selectInsOrderPlanList, selectUserCondition} from "@/api/business/inspectionTask";
import {mapGetters} from "vuex";
import {upReportUrl} from "@/api/business/insReport";
import filePreview from "@/components/Preview/filePreview.vue";
export default {
@@ -68,9 +68,9 @@
    onlyoffice,
    limsTable,
  },
  dicts: ["urgency_level", "inspection_task_state","material_prop_type"],
  dicts: ["urgency_level", "inspection_task_state", "material_prop_type"],
  computed: {
    ...mapGetters(["nickName", "userId"]),
    ...mapGetters(["nickName", "userId", "roles"]),
  },
  data() {
    return {
@@ -95,7 +95,7 @@
          dataType: "link",
          linkMethod: "selectAllByOne",
        },
        { label: "样品名称", prop: "sample", width: "160px" },
        {label: "样品名称", prop: "sample", width: "160px"},
        // {
        //   label: '物料属性',
        //   prop: 'materialProp',
@@ -119,14 +119,14 @@
          formatData: (params) => {
            if (params == 0) {
              return "外购下单";
            } else if(params==1) {
            } else if (params == 1) {
              return "原材料下单";
            }else{
            } else {
              return "委托下单";
            }
          },
        },
        { label: "样品型号", prop: "sampleModel", width: "120px" },
        {label: "样品型号", prop: "sampleModel", width: "120px"},
        // {
        //   label: "紧急程度",
        //   prop: "type",
@@ -177,12 +177,12 @@
            }
          },
        },
        { label: "检验人", prop: "userName" },
        { label: "复核人", prop: "checkName" },
        { label: "约定时间", prop: "appointed" },
        { label: "下发时间", prop: "sendTime", width: "140px" },
        { label: "检验开始时间", prop: "insTime", width: "140px" },
        { label: "理由", prop: "verifyTell", width: "140px" },
        {label: "检验人", prop: "userName"},
        {label: "复核人", prop: "checkName"},
        {label: "约定时间", prop: "appointed"},
        {label: "下发时间", prop: "sendTime", width: "140px"},
        {label: "检验开始时间", prop: "insTime", width: "140px"},
        {label: "理由", prop: "verifyTell", width: "140px"},
        {
          dataType: "action",
          fixed: "right",
@@ -195,6 +195,7 @@
                this.handleReview(row);
              },
              disabled: (row) => {
                if (this.roles.includes("admin")) return false
                return row.checkName == null || (row.checkName && !row.checkName.includes(this.nickName))
              }
            },
@@ -260,9 +261,9 @@
      currentTime: null,
      sonLaboratoryList: [],
      typeSourceList: [
        { label: '委托下单', value: -1 },
        { label: '外购下单', value: 0 },
        { label: '原材料下单', value: 1 },
        {label: '委托下单', value: -1},
        {label: '外购下单', value: 0},
        {label: '原材料下单', value: 1},
      ],
      isCopper: null,
      customsInspection: {},
@@ -272,10 +273,10 @@
      fullscreen: false,
      option: null,
      orderTypeList: [
        { label: '委托试验', value: 'Customer-ordered test', type: 'success' },
        { label: '抽检', value: '抽检', type: 'danger' },
        { label: '进厂检验', value: '进厂检验', type: 'info' },
        { label: '季度检验', value: 'Quarterly inspection', type: '' },
        {label: '委托试验', value: 'Customer-ordered test', type: 'success'},
        {label: '抽检', value: '抽检', type: 'danger'},
        {label: '进厂检验', value: '进厂检验', type: 'info'},
        {label: '季度检验', value: 'Quarterly inspection', type: ''},
      ],
      urgencyLevel: [],
      inspectionTaskState: [],
@@ -300,9 +301,9 @@
  methods: {
    refreshTable() {
      this.tableLoading = true;
      let param = { ...this.entity, ...this.page };
      let param = {...this.entity, ...this.page};
      delete param.total;
      selectInsOrderPlanList({ ...param }).then((res) => {
      selectInsOrderPlanList({...param}).then((res) => {
        this.tableLoading = false;
        if (res.code === 200) {
          this.tableData = res.data.records;
@@ -312,7 +313,7 @@
        this.tableLoading = false;
      });
    },
    pagination({ page, limit }) {
    pagination({page, limit}) {
      this.page.current = page;
      this.page.size = limit;
      this.refreshTable();
@@ -321,7 +322,7 @@
      this.resetForm('entity')
      this.refreshTable()
    },
    rowClassName({ row, rowIndex }) {
    rowClassName({row, rowIndex}) {
      if (this.currentTime == row.appointed) {
        return "highlight-warning-row-border";
      } else if (this.currentTime > row.appointed) {
@@ -383,7 +384,7 @@
    },
    // 下载报告
    download(row) {
      let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      let url = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
      const link = document.createElement('a');
      link.href = this.javaApi + url;
      link.target = '_blank';
@@ -397,13 +398,14 @@
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        upReportUrl({ id: row.insReportId }).then(res => {
        upReportUrl({id: row.insReportId}).then(res => {
          if (res.code === 200) {
            this.$message.success('还原成功')
            this.refreshTable()
          }
        })
      }).catch(() => { })
      }).catch(() => {
      })
    },
    // 查看报告
@@ -416,7 +418,7 @@
        fileName = row.tempUrlPdf
        fileType = "pdf"
      }
      fileName = fileName.replace('/word/','')
      fileName = fileName.replace('/word/', '')
      const userName = this.nickName
      this.option = {
        url: this.javaApi + "/word/" + fileName,
@@ -432,7 +434,7 @@
      this.issuedVisible = true;
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
      selectUserCondition({type: 1}).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
@@ -451,6 +453,7 @@
  margin-bottom: 10px;
  display: flex;
}
.page_total span:last-child {
  color: #3a7bfa;
  font-size: 23px;