zouyu
2025-03-14 fb941952ff7d5c03bc2251ec7e5ba0b498987894
检验任务搬迁
已添加3个文件
已修改6个文件
10870 ■■■■■ 文件已修改
src/api/business/inspectionOrder.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/inspectionTask.js 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/lims-table.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/excelFountion.js 376 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/file.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/add.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/Inspection.vue 8086 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 2065 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/inspectionOrder.js
@@ -111,8 +111,8 @@
export function viewDetails(query) {
  return request({
    url: '/insOrder/viewDetails',
    method: 'get',
    params: query
    method: 'post',
    data: query
  })
}
src/api/business/inspectionTask.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,256 @@
import request from '@/utils/request'
// åŠ¨æ€èŽ·å–tab表头
export function getTabHeader(query) {
  return request({
    url: '/insOrderPlan/getTabHeader',
    method: 'get',
    params: query
  })
}
// æŸ¥çœ‹ç»“果按钮
export function getInsOrderPlanList(query) {
  return request({
    url: '/insOrderPlan/getInsOrderPlanList',
    method: 'post',
    data: query
  })
}
// å¯¼å‡ºå§”托费用
export function exportCommissionFees(query) {
  return request({
    url: '/insOrderPlan/exportCommissionFees',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
// å¯¼å‡ºå¾…检任务
export function exportUnInsProducts(query) {
  return request({
    url: '/insOrderPlan/exportUnInsProducts',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
// å¯¼å‡ºæŸ¥çœ‹æ£€éªŒç»“æžœExcel
export function exportInsOrderPlanResult(query) {
  return request({
    url: '/insOrderPlan/exportInsOrderPlanResult',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}
// æŸ¥çœ‹æ£€éªŒä»»åŠ¡åˆ—è¡¨
export function selectInsOrderPlanList(query) {
  return request({
    url: '/insOrderPlan/selectInsOrderPlanList',
    method: 'get',
    params: query
  })
}
// æ£€éªŒå•详情-任务切换
export function inspectionOrderDetailsTaskSwitching(query) {
  return request({
    url: '/insOrderPlan/inspectionOrderDetailsTaskSwitching',
    method: 'get',
    params: query
  })
}
// è®¤é¢†æŒ‰é’®
export function claimInsOrderPlan(query) {
  return request({
    url: '/insOrderPlan/claimInsOrderPlan',
    method: 'post',
    data: query
  })
}
// æ£€éªŒæŒ‰é’®
export function doInsOrder(query) {
  return request({
    url: '/insOrderPlan/doInsOrder',
    method: 'get',
    params: query
  })
}
// åˆ‡æ¢å¥—管/光纤/光纤带记录模版查询检验内容
export function getReportModel(query) {
  return request({
    url: '/insOrderPlan/getReportModel',
    method: 'get',
    params: query
  })
}
// èŽ·å–æ£€éªŒé¡¹ç›®å’Œæ¨¡æ¿å†…å®¹
export function getInsProduct(query) {
  return request({
    url: '/insOrderPlan/getInsProduct',
    method: 'get',
    params: query
  })
}
// äº¤æŽ¥æŒ‰é’®
export function upPlanUser(query) {
  return request({
    url: '/insOrderPlan/upPlanUser',
    method: 'post',
    data: query
  })
}
// åˆ¤æ–­äº¤æŽ¥çš„试验室
export function upPlanUser2(query) {
  return request({
    url: '/insOrderPlan/upPlanUser2',
    method: 'get',
    params: query
  })
}
// å¤æ ¸æŒ‰é’®
export function verifyPlan(query) {
  return request({
    url: '/insOrderPlan/verifyPlan',
    method: 'post',
    data: query
  })
}
// æ ¡éªŒæ£€éªŒä»»åŠ¡æäº¤
export function checkSubmitPlan(query) {
  return request({
    url: '/insOrderPlan/checkSubmitPlan',
    method: 'post',
    data: query
  })
}
// æäº¤æ£€éªŒä»»åŠ¡
export function submitPlan(query) {
  return request({
    url: '/insOrderPlan/submitPlan',
    method: 'post',
    data: query
  })
}
// èŽ·å–è®¾å¤‡åç§°
export function getEquipName(query) {
  return request({
    url: '/insOrderPlan/getEquipName',
    method: 'get',
    params: query
  })
}
// ä¿å­˜æ£€éªŒå†…容
export function saveInsContext(query) {
  return request({
    url: '/insOrderPlan/saveInsContext',
    method: 'post',
    data: query
  })
}
// ä¸Šä¼ é™„件按钮
export function uploadFile(query) {
  return request({
    url: '/insOrderPlan/uploadFile',
    method: 'post',
    data: query
  })
}
// åˆ é™¤é™„件按钮
export function delfile(query) {
  return request({
    url: '/insOrderPlan/delfile',
    method: 'post',
    data: query
  })
}
// ä¸‹è½½é™„ä»¶
export function downFile(query) {
  return request({
    url: '/insOrderPlan/downFile',
    method: 'get',
    params: query
  })
}
// å¡«å†™æ¸©åº¦ä¸Žæ¹¿åº¦
export function write(query) {
  return request({
    url: '/insOrderPlan/write',
    method: 'post',
    data: query
  })
}
// æ¸©åº¦å¾ªçŽ¯æŸ¥çœ‹åˆ—è¡¨æ•°æ®(包括通过样品id,循环次数,温度,循环次数进行筛选)
export function temCycle(query) {
  return request({
    url: '/insOrderPlan/temCycle',
    method: 'get',
    params: query
  })
}
// å¼§åž‚特殊项查看列表数据
export function getSagTemperatureProducts(query) {
  return request({
    url: '/insOrderPlan/getSagTemperatureProducts',
    method: 'get',
    params: query
  })
}
// (电力的应力应变)保存检验内容
export function saveInsContext2(query) {
  return request({
    url: '/insOrderPlan/saveInsContext2',
    method: 'post',
    data: query
  })
}
// æ ¹æ®è®¢å•id查询样品信息
export function getSampleInfoByOrderId(query) {
  return request({
    url: '/insOrderPlan/getSampleInfoByOrderId',
    method: 'get',
    params: query
  })
}
// ä»»åŠ¡å±•ç¤º
export function tasksShow(query) {
  return request({
    url: '/insOrderPlan/tasksShow',
    method: 'get',
    params: query
  })
}
// èŽ·å–å­è¯•éªŒå®¤å½“æœˆçš„æ€»æ£€éªŒä»»åŠ¡æ•°é‡
export function getCurrentMonthPlanTotal(query) {
  return request({
    url: '/insOrderPlan/getCurrentMonthPlanTotalBySonLaboratory',
    method: 'get',
    params: query
  })
}
src/components/Table/lims-table.vue
@@ -414,10 +414,20 @@
      this.doLayout();
    },
  },
  updated() {
    this.$nextTick(() => {
      this.$refs.multipleTable.doLayout();
    });
  },
  mounted() {
    this.calculateSpanInfo();
  },
  methods: {
    doLayout() {
      this.$nextTick(() => {
        this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
      });
    },
    getWidth(row, row0) {
      let count = 0;
      row.forEach((a) => {
@@ -489,6 +499,7 @@
      if (!linkEvent) {
        return this.$message.warning("请配置lingk事件");
      }
      console.log(linkEvent);
      linkEvent.vueComponent[linkEvent.method](row);
    },
    // åˆå¹¶å•元格
src/utils/excelFountion.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,376 @@
/**
 * è®¡ç®—多个数值的和
 *
 * @param val æ•°å€¼åž‹å‚数,可变长参数列表
 * @returns è¿”回所有参数的和,如果参数列表为空或参数类型非数值型,则返回null
 */
function SUM(...val){
  try {
    let num = null;
    if(val&&val.length>0){
      val.forEach(item=>{
        num+=item;
      })
    }
    return num;
  } catch (error) {
  }
}
/**
 * è®¡ç®—传入参数中的最大值
 *
 * @param ...val å¯å˜å‚数列表,用于计算最大值的数值或可转换为数值的类型
 * @returns è¿”回最大值,如果参数列表为空或为null/undefined/'',则返回null
 */
function MAX(...val){
  try {
    let max = null;
    if(val&&val.length>0){
      val = val.filter(item=>item!=null&&item!=='')
      if(val.length>0){
        max = Math.max(...val)
      }else{
        max = null;
      }
    }
    return max;
  } catch (error) {
  }
}
/**
 * è®¡ç®—传入参数中的最小值
 *
 * @param val å¯å˜å‚数,用于计算最小值的数值数组
 * @returns è¿”回传入参数中的最小值,如果传入参数为空或所有值均为null或空字符串,则返回null
 */
function MIN(...val){
  try {
    let min = null;
    if(val&&val.length>0){
      val = val.filter(item=>item!=null&&item!=='')
      // console.log(val)
      if(val.length>0){
        min = Math.min(...val)
      }
    }
    return min;
  } catch (error) {
  }
}
/**
 * è®¡ç®—给定数值的平均值
 *
 * @param val æ•°å€¼åˆ—表,可包含任意个参数
 * @returns è¿”回平均值,如果数值列表为空或包含非数值项,则返回null
 */
function AVERAGE(...val){
  try {
    let num = 0;
    let arr = [];
    if(val&&val.length>0){
      arr = val.filter(item=>item!=null&&item!=='')
      arr.forEach(item=>{
        num+=item;
      })
      if(arr.length>0){
        return num/arr.length;
      }else{
        return null;
      }
    }else{
      return null;
    }
  } catch (error) {
  }
}
/**
 * è®¡ç®—一个数的绝对值
 *
 * @param val ä»»æ„æ•°å€¼
 * @returns è¿”回该数值的绝对值
 */
function ABS(val){
  try {
    return Math.abs(val);
  } catch (error) {
  }
}
/**
 * è®¡ç®—一组数字的中位数
 *
 * @param val ä»»æ„ä¸ªå‚数,需要计算中位数的数字
 * @returns å¦‚果参数中有有效的数字,则返回计算出的中位数;否则返回null
 */
function MEDIAN(...val){
  try {
    let arr = [];
    if(val&&val.length>0){
      arr = val.filter(item=>item!=null&&item!=='')
      const sortedArr = arr.sort((a, b) => a - b);
      // è®¡ç®—中位数
      const half = Math.floor(sortedArr.length / 2);
      if(arr.length>0){
        // å¦‚果数组长度是奇数,直接取中间的元素
        if (sortedArr.length % 2 === 1) {
          return sortedArr[half];
        } else { // å¦‚果数组长度是偶数,取中间两个元素的平均值
          return (sortedArr[half - 1] + sortedArr[half]) / 2;
        }
      }else{
        return null;
      }
    }else{
      return null;
    }
  } catch (error) {
  }
}
/**
 * è®¡ç®—幂
 *
 * @param str å­—符串形式的幂表达式,例如"2^3"
 * @returns è¿”回计算后的幂值,如果表达式无效则返回null
 */
function CalculatePower(str){
  try {
    if(str&&str.includes('^')){
      let arr = str.split('^');
      if(arr&&arr.length>1){
        return Math.pow(arr[0],arr[1]);
      }else{
        return null;
      }
    }
  } catch (error) {
  }
}
/**
 * æ ¹æ®åæ ‡èŽ·å–åˆ—å
 * @param {Object} cellId
 */
function getColumnNameFromId(cellId){
  try{
    if (! Array.isArray(cellId)) {
      cellId = cellId.split('-');
    }
    var i = cellId[0];
    var letter = '';
    if (i > 701) {
      letter += String.fromCharCode(64 + parseInt(i / 676));
      letter += String.fromCharCode(64 + parseInt((i % 676) / 26));
    } else if (i > 25) {
      letter += String.fromCharCode(64 + parseInt(i / 26));
    }
    letter += String.fromCharCode(65 + (i % 26));
    return letter + (parseInt(cellId[1]) + 1);
  }catch(e){
    console.log('error',cellId)
  }
}
/**
 * æ ¹æ®åˆ—名获取坐标
 * @param {Object} id
 * @param {Object} arr
 */
function getIdFromColumnName(id, arr) {
  try{
    // Get the letters
    var t = /^[a-zA-Z]+/.exec(id);
    if (t) {
      // Base 26 calculation
      var code = 0;
      for (var i = 0; i < t[0].length; i++) {
        code += parseInt(t[0].charCodeAt(i) - 64) * Math.pow(26, (t[0].length - 1 - i));
      }
      code--;
      // Make sure jexcel starts on zero
      if (code < 0) {
        code = 0;
      }
      // Number
      var number = parseInt(/[0-9]+$/.exec(id));
      if (number > 0) {
        number--;
      }
      if (arr == true) {
        id = [ code, number ];
      } else {
        // id = code + '-' + number;
        id = {
          c:code,
          r:number
        }
      }
    }
    return id;
  }catch(e){
    console.log('error',id)
  }
}
/**
 * æ›´æ”¹å‚æ•°
 *
 * @param f å‚数列表
 * @returns è¿”回一个包含坐标信息的数组
 */
function changeParameter(f){
  try {
    let arr = getABCList(f)
    let arr2 = []
    arr.forEach(item=>{
      if(item.includes(':')){
        let r0 = getIdFromColumnName(item.split(':')[0]).r;
        let c0 = getIdFromColumnName(item.split(':')[0]).c;
        let r1 = getIdFromColumnName(item.split(':')[1]).r;
        let c1 = getIdFromColumnName(item.split(':')[1]).c;
        for (let i = Number(r0); i <= Number(r1); i++) {
          for (let u = Number(c0); u <= Number(c1); u++) {
            arr2.push({
              r: i,
              c: u
            })
          }
        }
      }else{
        arr2.push(getIdFromColumnName(item))
      }
    })
    return arr2;
  } catch (error) {
  }
}
/**
 * èŽ·å–åŒ…å« ABC å­—符的列表
 *
 * @param f å­—符串,包含需要解析的公式或表达式
 * @returns åŒ…含 ABC å­—符的数组列表
 */
function getABCList(f){
  try {
    let regex = /[=\+\-\*\%\(\)\/\^\s]/g;
    let fouList = [
      "SUM",
      'MAX',
      'MIN',
      'AVERAGE',
      'ABS',
    ]
    f = f.replace(regex, ',').replace(new RegExp('"&', 'g'),'').replace(new RegExp('&"', 'g'),'')
    fouList.forEach(item=>{
      f = f.replace(new RegExp(item, 'g'),'')
    })
    // console.log('f',f)
    let arr = f.split(',').filter(item=>{
      return item&& /[a-zA-Z]/.test(item)&&item!='undefined'&&item!='null'
    });
    return arr;
  } catch (error) {
  }
}
/**
 * èŽ·å–æ‰€æœ‰å•å…ƒæ ¼
 *
 * @param f è¡¨æ ¼æ•°æ®æˆ–相关参数
 * @returns è¿”回一个对象,其键为单元格的唯一标识符(由列和行ID拼接而成),值为null
 */
function getAllCell(f){
  try {
    let arr = changeParameter(f)
    let arr0 = {}
    arr.forEach(item=>{
      arr0[getColumnNameFromId(`${item.c}`+'-'+`${item.r}`)] = null
    })
    return arr0;
  } catch (error) {
  }
}
/**
 * è®¡ç®—函数
 *
 * @param f å­—符串类型,表示待计算的公式
 * @param comValue å¯¹è±¡ç±»åž‹ï¼Œè¡¨ç¤ºè¦æ›¿æ¢çš„单元格值,键为单元格名称,值为替换后的值
 * @returns è¿”回计算后的结果,如果计算失败则返回0
 */
function compute(f,comValue){
  try {
    let str = f
    // èŽ·å–å•å…ƒæ ¼å¯¹åº”å€¼
    let arr = getAllCell(f)
    for (var a in comValue) {
      if(comValue[a]!=='undefined'&&comValue[a]!=='null'&&comValue[a]!==undefined){
        if(typeof(comValue[a])=='string'&&comValue[a].includes('^')){
          // è®¡ç®—幂次
          arr[a] = CalculatePower(comValue[a])
        } else if (typeof(comValue[a])=='string'&&comValue[a].includes('/')) {
          arr[a] = comValue[a]
        } else{
          arr[a] = comValue[a]
        }
      }
    }
    // è§£æžå…¬å¼å‚数,特别是带:的
    let arr0 = getABCList(f)
    let obj = {}
    arr0.forEach(item=>{
      if(item.includes(':')){
        let arr1 = []
        let r0 = getIdFromColumnName(item.split(':')[0]).r;
        let c0 = getIdFromColumnName(item.split(':')[0]).c;
        let r1 = getIdFromColumnName(item.split(':')[1]).r;
        let c1 = getIdFromColumnName(item.split(':')[1]).c;
        for (let i = Number(r0); i <= Number(r1); i++) {
          for (let u = Number(c0); u <= Number(c1); u++) {
            arr1.push({
              r: i,
              c: u
            })
          }
        }
        let arr2 = []
        arr1.forEach(m=>{
          arr2.push(getColumnNameFromId(`${m.c}`+'-'+`${m.r}`))
        })
        obj[item.split(':').join('-')] = arr2.join(',')
      }else{
        obj[item] = item
      }
    })
    str = str.replace(new RegExp(':', 'g'),'')
    // æ›¿æ¢å‚æ•°
    for (var a in obj) {
      str = str.replace(new RegExp(a, 'g'),obj[a])
    }
    // è®¡ç®—
    for (var a in arr) {
      str = str.replace(new RegExp(a, 'g'),arr[a])
    }
    return eval(str)
  } catch (error) {
  }
}
export default {
  compute,
  changeParameter,
  AVERAGE
}
src/utils/file.js
@@ -59,3 +59,28 @@
    image.src = imgsrc;
  }
};
export function transformExcel(response,tempName){
  const relType = ['application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel;charset=UTF-8']
  let type = response.type
  if (relType.includes(type)) {
    const blob = new Blob([response], {type: 'application/vnd.ms-excel'})
    let temp = tempName
    if(response.headers){
      const disposition = response.headers["content-disposition"]
      temp = disposition.substring(disposition.lastIndexOf('=') + 1)
    }
    let filename = decodeURI(temp)
    // åˆ›å»ºä¸€ä¸ªè¶…链接,将文件流赋进去,然后实现这个超链接的单击事件
    const elink = document.createElement('a')
    elink.download = filename
    elink.style.display = 'none'
    elink.href = URL.createObjectURL(blob)
    document.body.appendChild(elink)
    elink.click()
    URL.revokeObjectURL(elink.href) // é‡Šæ”¾URL å¯¹è±¡
    document.body.removeChild(elink)
  }
}
src/views/business/inspectionOrder/add.vue
@@ -77,10 +77,7 @@
            v-show="active == 3 && addObj.companyId"
            >通过</el-button
          >
          <el-button
            size="medium"
            @click="$router.push('/business/inspectionOrder')"
          >
          <el-button size="medium" @click="goBack">
            <span style="color: #3a7bfa">返回</span>
          </el-button>
        </el-col>
@@ -1916,6 +1913,12 @@
    }
  },
  methods: {
    goBack() {
      let path = this.$route.query.isPlan
        ? "/business/inspectionTask"
        : "/business/inspectionOrder";
      this.$router.push(path);
    },
    //下次核查日期:禁用在核查日期前的日期
    disabledDate(time) {
      if (time) {
@@ -3363,7 +3366,7 @@
          if (res.code === 200) {
            this.$message.success("已提交");
            this.bsm3Dia = false;
            this.$router.push("/business/inspectionOrder");
            this.goBack();
          }
          this.saveLoad = false;
        })
@@ -3533,7 +3536,7 @@
                this.$message.success("提交成功");
                this.issuedDialogVisible = false;
                this.upLoad = false;
                this.$router.replace("/business/inspectionOrder");
                this.goBack();
                //审核通过后,自动打印二维码
                //TODO: ç”µåŠ›è¯•éªŒå®¤æš‚æ—¶ä¸ç”¨æ ‡ç­¾æ‰“å°
                if (
@@ -4624,7 +4627,7 @@
            this.tell = "";
            this.$message.success("提交成功");
            this.issuedDialogVisible = false;
            this.$router.push("/business/inspectionOrder");
            this.goBack();
          }
        })
        .catch((error) => {
src/views/business/inspectionOrder/index.vue
@@ -822,12 +822,12 @@
  revokeReviewConsistentByProductId,
  revokeReviewProduct,
  revokeReviewSample,
  upPlanUser2,
  updateStatus,
  updateInspected,
  revocationPassed,
  revocationCancel,
} from "@/api/business/inspectionOrder";
import { upPlanUser2 } from "@/api/business/inspectionTask";
import { getDicts } from "@/api/system/dict/data";
import vueQr from "vue-qr";
import getLodop from "@/utils/lodop";
@@ -1013,7 +1013,9 @@
            {
              name: "报告下载",
              type: "text",
              clickFun: (row) => {},
              clickFun: (row) => {
                this.download(row);
              },
              disabled: (row, index) => {
                return row.state != 4 || row.isRatify != 1;
              },
@@ -1194,7 +1196,9 @@
            {
              name: "查看",
              type: "text",
              clickFun: (row) => {},
              clickFun: (row) => {
                this.viewDetails(row);
              },
              showHide: (row) => {
                return (
                  row.inspectionItem == "单根垂直燃烧" ||
@@ -1628,7 +1632,7 @@
          active: 2,
          currentId: row.id,
          examine: 1,
          isReview: true,
          isPlan: false,
        },
      });
    },
@@ -1647,23 +1651,6 @@
    },
    // ä¸‹è½½æŠ¥å‘Š
    download(row) {
      // let url = row.urlS ? row.urlS : row.url;
      // if (url) {
      //   url = url.split(".")[0] + ".pdf";
      //   const link = document.createElement("a");
      //   link.href = this.javaApi + url;
      //   link.target = "_blank";
      //   document.body.appendChild(link);
      //   link.click();
      // }
      // if(row.tempUrlPdf) {
      //   const link = document.createElement('a');
      //   link.href = this.javaApi + row.tempUrlPdf;
      //   link.target = '_blank';
      //   document.body.appendChild(link);
      //   link.click();
      // }
      downReport({ id: row.reportId })
        .then((res) => {
          let fileName = row.tempUrlPdf;
@@ -2283,6 +2270,7 @@
        query: {
          active: num,
          examine: 0,
          isPlan: false,
        },
      });
    },
src/views/business/inspectionTask/Inspection.vue
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
src/views/business/inspectionTask/index.vue
@@ -1,9 +1,2068 @@
<template>
  <div>检验任务</div>
  <div class="bg-1" style="padding: 15px 5px">
    <basic-container>
      <div class="search" :style="`height: ${more ? 100 : 50}px;`">
        <el-row :gutter="10" style="width: 100%">
          <el-col :span="16" style="display: flex; flex-wrap: wrap">
            <div
              class="search_thing"
              style="margin-left: 20px"
              v-if="maxNum > 1"
            >
              <div class="search_label">委托编号:</div>
              <div class="search_input">
                <el-input
                  size="small"
                  placeholder="请输入"
                  clearable
                  v-model="queryParams.entrustCode"
                  @keyup.enter.native="refreshTable()"
                ></el-input>
              </div>
            </div>
            <div
              class="search_thing"
              style="margin-left: 20px"
              v-if="maxNum > 2"
            >
              <div class="search_label">样品编号:</div>
              <div class="search_input">
                <el-input
                  size="small"
                  placeholder="请输入"
                  clearable
                  v-model="queryParams.sampleCode"
                  @keyup.enter.native="refreshTable()"
                ></el-input>
              </div>
            </div>
            <div
              class="search_thing"
              style="margin-left: 20px"
              v-if="maxNum > 3"
            >
              <div class="search_label">样品名称:</div>
              <div class="search_input">
                <el-input
                  size="small"
                  placeholder="样品大类/样品名称"
                  clearable
                  v-model="queryParams.sample"
                  @keyup.enter.native="refreshTable()"
                ></el-input>
              </div>
            </div>
            <div
              class="search_thing"
              style="margin-left: 20px"
              v-if="maxNum >= 4 || more"
            >
              <div class="search_label">检验状态:</div>
              <div class="search_input">
                <el-select
                  size="small"
                  v-model="queryParams.insState"
                  style="width: 100%"
                  clearable
                  @change="refreshTable()"
                >
                  <el-option
                    v-for="(a, i) in insStateList"
                    :key="i"
                    :label="a.dictLabel"
                    :value="a.dictValue"
                  ></el-option>
                </el-select>
              </div>
            </div>
            <div
              class="search_thing"
              style="margin-left: 20px"
              v-if="maxNum >= 5 || more"
            >
              <div class="search_label">下发时间:</div>
              <div class="search_input">
                <div class="search_input">
                  <el-date-picker
                    size="small"
                    clearable
                    @change="refreshTable()"
                    v-model="queryParams.sendTimeRange"
                    type="daterange"
                    value-format="yyyy-MM-dd[T]HH:mm:ss"
                    range-separator="至"
                    start-placeholder="开始日期"
                    end-placeholder="结束日期"
                    :default-time="['00:00:00', '23:59:59']"
                  >
                  </el-date-picker>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="8">
            <div class="search_thing">
              <el-button
                v-if="maxNum < 5"
                type="text"
                :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
                style="color: #3a7bfa"
                @click="more = !more"
                >{{ !more ? "更多" : "收起" }}</el-button
              >
              <div class="search_thing" style="padding-left: 10px">
                <el-button size="small" @click="refresh()">重 ç½®</el-button>
                <el-button size="small" type="primary" @click="refreshTable()"
                  >查 è¯¢</el-button
                >
                <template>
                  <el-button size="small" type="primary" @click="excelExport"
                    >查看结果</el-button
                  >
                  <el-button
                    size="small"
                    type="primary"
                    @click="unInsDialogVisible = true"
                    >导出待检信息</el-button
                  >
                </template>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
    </basic-container>
    <basic-container>
      <div class="center">
        <div class="center-options">
          <el-row>
            <el-col :span="24">
              <div
                style="
                  display: flex;
                  align-items: center;
                  justify-content: space-between;
                "
              >
                <div style="display: flex; align-items: center">
                  <ul class="tab">
                    <li
                      v-for="(m, i) in tabList"
                      :key="i"
                      :class="{ active: i == tabIndex }"
                      @click="handleTab(m, i)"
                    >
                      {{ m.label.replace("试验室", "") }}
                    </li>
                  </ul>
                  <div>
                    <el-checkbox
                      @change="changeCheckBox"
                      class="view-self-checkbox"
                      v-model="alone"
                      ><span>我的任务</span></el-checkbox
                    >
                  </div>
                </div>
                <div class="center-title">
                  <p>
                    <span>本月任务数量:</span>
                    <span v-if="currentMonthPlanTotal != undefined">{{
                      currentMonthPlanTotal
                    }}</span>
                  </p>
                  <p>
                    <span>总计任务数量:</span>
                    <span v-if="$refs.insOrderPlan != undefined">{{
                      $refs.insOrderPlan.page.total
                    }}</span>
                  </p>
                </div>
              </div>
            </el-col>
          </el-row>
        </div>
        <lims-table
          ref="insOrderPlan"
          highlightCurrentRow
          :rowClassName="changeRowClass"
          :tableData="tableData"
          :height="tableMainHeight + ''"
          :column="column"
          @pagination="pagination"
          :page="page"
          :tableLoading="tableLoading"
        >
        </lims-table>
      </div>
    </basic-container>
    <div v-show="activeFace == 0 && state == 0" style="height: 100%"></div>
    <el-dialog title="提示" :visible.sync="claimVisible" width="400px">
      æ˜¯å¦è®¤é¢†å§”托编号<span style="color: #33c130">{{
        sampleUserForm.entrustCode
      }}</span
      >的任务
      <span slot="footer" class="dialog-footer">
        <el-button @click="claimVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmClaim" :loading="loading"
          >ç¡® å®š</el-button
        >
      </span>
    </el-dialog>
    <el-dialog title="检验交接" :visible.sync="connectVisible" width="400px">
      <div class="search_thing">
        <div class="search_label" style="width: 90px">
          <span class="required-span">* </span>交接人员:
        </div>
        <div class="search_input">
          <el-select
            v-model="connect.connectPerson"
            placeholder="请选择"
            style="width: 100%"
            filterable
          >
            <el-option-group
              v-for="(item, index) in Object.keys(personList)"
              :key="index"
              :label="item"
            >
              <el-option
                :disabled="
                  userNameList.filter((name) => name == op.name).length > 0
                "
                v-for="op in personList[item]"
                :key="op.id"
                :label="op.name"
                :value="op.id"
              >
              </el-option>
            </el-option-group>
          </el-select>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label" style="width: 90px">
          <span class="required-span">* </span>试验室:
        </div>
        <div class="search_input">
          <el-select
            v-model="connect.sonLaboratory"
            placeholder="请选择"
            style="width: 100%"
            filterable
          >
            <el-option
              v-for="item in sonLaboratoryList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="connectVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="confirmConnect" :loading="loading"
          >ç¡® å®š</el-button
        >
      </span>
    </el-dialog>
    <div style="width: 100%; height: 100%" v-if="activeFace > 0">
      <Add :active="activeFace" :currentId="currentId" :examine="examine" />
    </div>
    <Inspection
      v-if="state > 0"
      @goback="goback"
      :handover="personList"
      :sonLaboratoryList="sonLaboratoryList"
      :orderId="orderId"
      :inspectorList="inspectorList"
      :sonLaboratory="componentData.entity.sonLaboratory"
      :state="state"
    />
    <el-dialog
      title="数据查看"
      :visible.sync="dataDialogVisible"
      width="100%"
      fullscreen
    >
      <!-- <div
        style="width: 100%; text-align: right; margin-bottom: 10px"
        v-if="premissionReviewFun()"
      >
        <el-button type="primary" size="small" @click="goReview(currentRow)"
          >前往复核</el-button
        >
      </div> -->
      <lims-table
        ref="dataLookTable"
        highlightCurrentRow
        :tableData="dataLooktableData"
        height="80vh"
        :column="dataLookColumn"
        :tableLoading="dataLookTableLoading"
      >
      </lims-table>
    </el-dialog>
    <!-- å¯¼å‡ºå¼¹æ¡† -->
    <el-dialog
      :title="title"
      :visible.sync="dialogVisibleExcel"
      fullscreen
      :before-close="handleClose"
    >
      <div class="search">
        <div style="display: flex">
          <div style="margin-right: 20px">
            <span>委托单号:</span>
            <el-input
              size="mini"
              placeholder="请输入"
              clearable
              style="width: 180px"
              v-model="excelForm.entrustCode"
              @keyup.enter.native="refreshTable()"
            ></el-input>
          </div>
          <div style="margin-right: 20px">
            <span>样品编号:</span>
            <el-input
              size="mini"
              placeholder="请输入"
              clearable
              v-model="excelForm.sampleCode"
              style="width: 180px"
              @keyup.enter.native="refreshTable()"
            ></el-input>
          </div>
          <div style="margin-right: 20px">
            <span>检验人:</span>
            <el-select
              size="mini"
              v-model="excelForm.sampleName"
              placeholder="请选择"
              @keyup.enter.native="refreshTable()"
              style="width: 120px"
            >
              <el-option-group
                v-for="(item, index) in Object.keys(personList)"
                :key="index"
                :label="item"
              >
                <el-option
                  v-for="op in personList[item]"
                  :key="op.id"
                  :label="op.name"
                  :value="op.id"
                >
                </el-option>
              </el-option-group>
            </el-select>
          </div>
          <div style="margin-right: 20px">
            <span>日期:</span>
            <el-date-picker
              size="mini"
              v-model="excelForm.dateTime"
              type="daterange"
              range-separator="至"
              value-format="yyyy-MM-dd HH:mm:ss"
              format="yyyy-MM-dd"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
            </el-date-picker>
          </div>
        </div>
        <div class="search_thing">
          <el-button
            size="mini"
            type="primary"
            icon="el-icon-search"
            @click="excelSearch"
            >查 è¯¢</el-button
          >
          <el-button
            size="mini"
            icon="el-icon-download"
            type="primary"
            @click="excelExportTrends"
            :loading="outLoading"
            >导 å‡º</el-button
          >
        </div>
      </div>
      <!-- è¡¨æ ¼å†…容 -->
      <el-divider content-position="left">检验结果</el-divider>
      <br />
      <div>
        <el-tabs
          type="border-card"
          v-model="activeName"
          @tab-click="handleClick"
        >
          <el-tab-pane
            v-for="(v, i) in tabs"
            :key="i"
            :label="v"
            :name="i.toString()"
          >
            <el-table
              :data="tabsData"
              border
              ref="showResultTable"
              v-loading="loadingTable"
              :height="tableHeight"
              element-loading-text="加载中"
              element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(255, 255, 255, 1)"
            >
              <el-table-column
                label="序号"
                type="index"
                width="60"
              ></el-table-column>
              <el-table-column
                label="委托单号"
                show-overflow-tooltip
                prop="entrustCode"
                width="180"
              ></el-table-column>
              <el-table-column
                show-overflow-tooltip
                label="样品编号"
                prop="sampleCode"
                width="180"
              ></el-table-column>
              <el-table-column
                label="管色标"
                prop="bushing"
                width="80"
              ></el-table-column>
              <el-table-column
                label="光纤带色标"
                prop="fibers"
                width="110"
              ></el-table-column>
              <el-table-column
                label="光纤色标"
                prop="fiber"
                width="100"
              ></el-table-column>
              <el-table-column
                label="检测项目分类"
                show-overflow-tooltip
                prop="inspectionItem"
                v-if="tabName != '温度循环'"
                width="180"
              ></el-table-column>
              <el-table-column
                label="检测人"
                prop="userName"
                width="80"
              ></el-table-column>
              <el-table-column
                label="检测时间"
                prop="insTime"
                width="180"
              ></el-table-column>
              <el-table-column
                label="下发时间"
                prop="sendTime"
                width="180"
              ></el-table-column>
              <el-table-column
                v-for="(v, i) in tableHeader"
                :label="v.label"
                :prop="v.prop"
                :key="i"
                min-width="120"
                show-overflow-tooltip
                :width="calcTableColumnWidth(v.label)"
              >
              </el-table-column>
            </el-table>
            <el-pagination
              background
              style="text-align: right; margin-top: 20px"
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[10, 20, 50, 100, 200]"
              :page-size="pageSize"
              layout="total, sizes, prev, pager, next, jumper"
              :total="total"
            >
            </el-pagination>
          </el-tab-pane>
        </el-tabs>
      </div>
    </el-dialog>
    <!-- å¯¼å‡ºå§”托费用弹框 -->
    <el-dialog
      title="委托费用统计导出"
      :visible.sync="commissionFeesDialogVisible"
      width="30%"
      :before-close="handleCloseCommissionFees"
    >
      <el-form :model="exportFees" ref="exportFees" :rules="feesRule">
        <el-form-item label="下单日期" prop="commissionFeesDate">
          <el-date-picker
            v-model="exportFees.commissionFeesDate"
            type="daterange"
            format="yyyy-MM-dd"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleCloseCommissionFees">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="exportcommissionFees"
          >ç¡® å®š</el-button
        >
      </span>
    </el-dialog>
    <!-- å¯¼å‡ºå¾…检信息弹框 -->
    <el-dialog
      title="待检任务导出"
      :visible.sync="unInsDialogVisible"
      width="30%"
      :before-close="handleCloseUnInsDialog"
    >
      <el-form
        :model="unInsProductsData"
        ref="exportUnInsProducts"
        :rules="unInsRule"
      >
        <el-form-item label="下发日期" prop="sendTime">
          <el-date-picker
            v-model="unInsProductsData.sendTime"
            type="daterange"
            format="yyyy-MM-dd"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleCloseUnInsDialog">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="exportUnInsProductsFun"
          >ç¡® å®š</el-button
        >
      </span>
    </el-dialog>
    <!-- æ•°æ®æŸ¥çœ‹è¯¦æƒ… -->
    <el-dialog
      title="查看详情"
      :visible.sync="dialogVisible"
      width="70%"
      :before-close="handleClose3"
    >
      <el-table
        v-if="type == '单根垂直燃烧' || type == '松套管'"
        :data="viewDetailsList"
        border
        height="400px"
        style="width: 100%"
      >
        <el-table-column
          type="index"
          label="序号"
          width="80px"
        ></el-table-column>
        <el-table-column prop="entrustCode" label="委托单号"></el-table-column>
        <el-table-column prop="sampleCode" label="样品编号"></el-table-column>
        <el-table-column
          prop="color"
          label="套管"
          v-if="viewDetailsList.filter((ele) => ele.color !== '').length > 0"
        ></el-table-column>
        <!-- <el-table-column prop="inspectionItem" label="检验项"></el-table-column> -->
        <el-table-column prop="insValue" label="检验结果"></el-table-column>
      </el-table>
      <el-table
        v-if="type == '抗拉强度'"
        :data="viewDetailsList"
        height="400px"
        border
        style="width: 100%"
      >
        <el-table-column
          type="index"
          label="序号"
          width="80px"
        ></el-table-column>
        <el-table-column prop="inspectionItem" label="检验项"></el-table-column>
        <el-table-column
          prop="inspectionItemSubclass"
          label="检验子项"
        ></el-table-column>
        <el-table-column prop="width" label="宽度"></el-table-column>
        <el-table-column prop="thickness" label="厚度"></el-table-column>
        <el-table-column prop="testValue" label="检验值"></el-table-column>
      </el-table>
      <el-table
        v-if="type == '断裂伸长率'"
        :data="viewDetailsList"
        height="400px"
        border
        style="width: 100%"
      >
        <el-table-column
          type="index"
          label="序号"
          width="80px"
        ></el-table-column>
        <el-table-column prop="inspectionItem" label="检验项"></el-table-column>
        <el-table-column
          prop="inspectionItemSubclass"
          label="检验子项"
        ></el-table-column>
        <el-table-column
          v-for="(v, i) in tableHeader"
          :key="i"
          :prop="`testValue${i}`"
          :label="`检验值${i + 1}`"
        ></el-table-column>
      </el-table>
    </el-dialog>
    <!-- è®¢å•基本信息弹框 -->
    <el-dialog
      title="委托单信息"
      :visible.sync="orderInfoDialog"
      top="5vh"
      width="70%"
    >
      <el-divider content-position="left">检验样品编号列表</el-divider>
      <el-table
        :data="insSampleListData"
        border
        height="200"
        :cell-style="{ textAlign: 'center' }"
        :header-cell-style="{ textAlign: 'center' }"
      >
        <el-table-column label="样品编号" prop="sampleCode"></el-table-column>
        <el-table-column label="状态" prop="state">
          <template slot-scope="scope">
            <el-tag type="danger" v-if="scope.row.state == 0">待检</el-tag>
            <el-tag type="warning" v-if="scope.row.state == 1">在检</el-tag>
            <el-tag type="success" v-if="scope.row.state == 2">已检</el-tag>
          </template>
        </el-table-column>
        <el-table-column label="检测人" prop="inspectName"></el-table-column>
      </el-table>
      <br />
      <el-divider content-position="left">委托单内容</el-divider>
      <el-table
        :data="insProductVOSData"
        border
        height="300"
        :cell-style="{ textAlign: 'center' }"
        :header-cell-style="{ textAlign: 'center' }"
      >
        <el-table-column
          label="样品编号"
          prop="sampleCode"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="样品型号"
          prop="model"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="检测项目"
          prop="testItem"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="检测子项"
          prop="testItemChildren"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="试验方法"
          prop="testMethod"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="标准要求"
          prop="requirement"
          show-overflow-tooltip
        ></el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>
<script>
export default {};
import { mapGetters } from "vuex";
import Inspection from "./Inspection.vue";
import { getYearAndMonthAndDays } from "@/utils/date";
import { transformExcel } from "@/utils/file";
import limsTable from "@/components/Table/lims-table.vue";
import {
  getCurrentMonthPlanTotal,
  exportCommissionFees,
  exportUnInsProducts,
  exportInsOrderPlanResult,
  getTabHeader,
  getInsOrderTemList,
  getInsOrderPlanList,
  claimInsOrderPlan,
  getSampleInfoByOrderId,
  selectInsOrderPlanList,
  upPlanUser2,
  upPlanUser,
} from "@/api/business/inspectionTask";
import {
  selectSampleAndProductByOrderId,
  viewDetails,
} from "@/api/business/inspectionOrder";
import { getDicts } from "@/api/system/dict/data";
import { getLaboratoryPersonList } from "@/api/system/user";
import LimsTable from "../../../components/Table/lims-table.vue";
export default {
  components: {
    Inspection,
    limsTable,
    LimsTable,
  },
  computed: {
    ...mapGetters(["permissions", "nickName"]),
  },
  data() {
    return {
      insStateList: [],
      urgencyDictList: [],
      tableData: [],
      column: [
        {
          label: "委托编号",
          prop: "entrustCode",
          minWidth: "160px",
          width: "160px",
          dataType: "link",
          linkEvent: {
            method: "selectAllByOne",
            vueComponent: this,
          },
        },
        {
          label: "委托单位",
          prop: "company",
          minWidth: "160px",
          width: "160px",
        },
        {
          label: "样品名称",
          prop: "sample",
          minWidth: "140px",
          width: "140px",
          dataType: "link",
          linkEvent: {
            method: "selectOrderInfo",
            vueComponent: this,
          },
        },
        {
          label: "样品型号",
          prop: "model",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "紧急程度",
          prop: "type",
          dataType: "tag",
          minWidth: "90px",
          width: "90px",
          formatData: (params) => {
            let index = this.urgencyDictList.findIndex(
              (item) => item.dictValue == params
            );
            if (index > -1) {
              return this.urgencyDictList[index].dictLabel;
            } else {
              return null;
            }
          },
          formatType: (params) => {
            let index = this.urgencyDictList.findIndex(
              (item) => item.dictValue == params
            );
            if (index > -1) {
              return this.urgencyDictList[index].listClass;
            } else {
              return null;
            }
          },
        },
        {
          label: "状态",
          prop: "insState",
          dataType: "tag",
          minWidth: "100px",
          width: "100px",
          formatData: (params) => {
            let index = this.insStateList.findIndex(
              (item) => item.dictValue == params
            );
            if (index > -1) {
              return this.insStateList[index].dictLabel;
            } else {
              return null;
            }
          },
          formatType: (params) => {
            let index = this.insStateList.findIndex(
              (item) => item.dictValue == params
            );
            if (index > -1) {
              return this.insStateList[index].listClass;
            } else {
              return null;
            }
          },
        },
        {
          label: "检验人",
          prop: "userName",
          minWidth: "140px",
          width: "140px",
        },
        {
          label: "复核人",
          prop: "checkName",
          minWidth: "100px",
          width: "100px",
        },
        {
          label: "约定时间",
          prop: "appointed",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "下发时间",
          prop: "sendTime",
          minWidth: "140px",
          width: "140px",
        },
        {
          label: "检验开始时间",
          prop: "insTime",
          minWidth: "140px",
          width: "140px",
        },
        {
          label: "理由",
          prop: "verifyTell",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "操作",
          dataType: "action",
          fixed: "right",
          operation: [
            {
              name: "数据查看",
              type: "text",
              clickFun: (row) => {
                this.handleDataLook(row);
              },
            },
            {
              name: "检验",
              type: "text",
              clickFun: (row) => {
                this.handleInspection(row);
              },
              disabled: (row, index) => {
                return (
                  row.userName == null ||
                  row.insState == 3 ||
                  row.insState == 5 ||
                  (row.userName && !row.userName.includes(this.nickName))
                );
              },
            },
            {
              name: "交接",
              type: "text",
              clickFun: (row) => {
                this.handleConnect(row);
              },
              disabled: (row, index) => {
                return (
                  row.userName == null ||
                  row.insState == 5 ||
                  row.insState == 3 ||
                  (row.userName &&
                    !row.userName.includes(this.nickName) &&
                    !this.isLeader)
                );
              },
            },
            {
              name: "复核",
              type: "text",
              clickFun: (row) => {
                this.handleReview(row);
              },
              disabled: (row, userName) => {
                return (
                  row.userName == null ||
                  row.insState != 3 ||
                  (row.checkName && !row.checkName.includes(this.nickName))
                );
              },
            },
            {
              name: "认领",
              type: "text",
              clickFun: (row) => {
                this.claimFun(row);
              },
              disabled: (row, index) => {
                return row.userName != null || row.checkName != null;
              },
            },
          ],
        },
      ],
      dataLooktableData: [],
      insResultList: [
        {
          value: 1,
          label: "合格",
          type: "success",
        },
        {
          value: 0,
          label: "不合格",
          type: "danger",
        },
        {
          value: 3,
          label: "不判定",
          type: "",
        },
      ],
      dataLookColumn: [
        {
          label: "委托编号",
          prop: "entrustCode",
          minWidth: "160px",
          width: "160px",
        },
        {
          label: "样品编号",
          prop: "sampleCode",
          minWidth: "160px",
          width: "160px",
        },
        {
          label: "管套色标",
          prop: "bushColor",
          minWidth: "100px",
          width: "100px",
        },
        {
          label: "光纤带编号",
          prop: "code",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "光纤色标",
          prop: "color",
          minWidth: "100px",
          width: "100px",
        },
        {
          label: "检验项",
          prop: "inspectionItem",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "检验子项",
          prop: "inspectionItemSubclass",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "检验结果",
          prop: "lastValue",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "结果判定",
          prop: "insResult",
          minWidth: "100px",
          width: "100px",
          dataType: "tag",
          formatData: (params) => {
            let index = this.insResultList.findIndex(
              (item) => item.value == params
            );
            if (index > -1) {
              return this.insResultList[index].label;
            } else {
              return null;
            }
          },
          formatType: (params) => {
            let index = this.insResultList.findIndex(
              (item) => item.value == params
            );
            if (index > -1) {
              return this.insResultList[index].type;
            } else {
              return null;
            }
          },
        },
        {
          label: "单位",
          prop: "unit",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "试验要求",
          prop: "tell",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "检验人",
          prop: "checkName",
          minWidth: "120px",
          width: "120px",
        },
        {
          label: "检验日期",
          prop: "checkTime",
          minWidth: "140px",
          width: "140px",
        },
        {
          label: "样品名称",
          prop: "sample",
          minWidth: "160px",
          width: "160px",
        },
        {
          label: "样品型号",
          prop: "model",
          minWidth: "160px",
          width: "160px",
        },
        {
          label: "试验室",
          prop: "sonLaboratory",
          minWidth: "120px",
          width: "120px",
        },
        {
          dataType: "action",
          label: "操作",
          fixed: "right",
          operation: [
            {
              name: "查看",
              type: "text",
              clickFun: (row) => {
                this.viewDetails(row);
              },
              // showHide: (row) => {
              //   return (
              //     row.inspectionItem == "单根垂直燃烧" ||
              //     row.inspectionItem.includes("松套管") ||
              //     row.inspectionItemSubclass.includes("松套管") ||
              //     (row.inspectionItem == "抗拉强度" &&
              //       (row.inspectionItemSubclass == "热老化处理前" ||
              //         row.inspectionItemSubclass == "热老化处理后")) ||
              //     (row.inspectionItem == "断裂伸长率" &&
              //       (row.inspectionItemSubclass == "热老化处理前" ||
              //         row.inspectionItemSubclass == "热老化处理后"))
              //   );
              // },
            },
          ],
        },
      ],
      dataLookTableLoading: false,
      queryParams: {
        entrustCode: null,
        sampleCode: null,
        sample: null,
        insState: null,
        sendTimeRange: [],
      },
      page: {
        total: 0,
        size: 20,
        current: 1,
      },
      tableLoading: false,
      //old
      tableHeader: [],
      type: "",
      maxNum: 1,
      isShowMore: false,
      more: false,
      dialogVisible: false,
      viewDetailsList: [],
      unInsDialogVisible: false,
      unInsProductsData: {
        sendTime: [],
      },
      exportFees: {
        commissionFeesDate: [],
      },
      feesRule: {
        commissionFeesDate: {
          required: true,
          message: "请选择下单日期",
          trigger: "change",
        },
      },
      unInsRule: {
        sendTime: {
          required: true,
          message: "请选择下发日期",
          trigger: "change",
        },
      },
      commissionFeesDialogVisible: false,
      commissionFeesDate: null,
      orderInfoDialog: false, //订单基本信息弹框
      tableHeight: 0,
      tableMainHeight: 0,
      outLoading: false,
      trendsTable: [],
      pageSize: 20,
      total: 0,
      currentPage: 1,
      loadingTable: true,
      activeName: "0",
      tabName: null,
      tabsData: [],
      tabs: [],
      selectTab: "",
      excelForm: {
        entrustCode: null,
        sampleCode: null,
        sampleName: null,
        dateTime: null,
      },
      dialogVisibleExcel: false,
      examine: null,
      inspectorList: [], //检验人员列表
      alone: false,
      sampleUserForm: {
        entrustCode: null,
        insSampleId: null,
        userId: null,
      },
      claimVisible: false,
      tabList: [],
      active: 1,
      tabIndex: 0,
      componentDataDataLook: {
        isPage: false,
        entity: {
          id: 0,
          orderBy: {
            field: "sampleCode",
            order: "asc",
          },
        },
        isIndex: false,
        showSelect: false,
        select: false,
        do: [
          {
            id: "",
            font: "查看",
            type: "text",
            method: "viewDetails",
            showFun: (row, index) => {
              return (
                row.inspectionItem == "单根垂直燃烧" ||
                row.inspectionItem.includes("松套管") ||
                row.inspectionItemSubclass.includes("松套管") ||
                (row.inspectionItem == "抗拉强度" &&
                  (row.inspectionItemSubclass == "热老化处理前" ||
                    row.inspectionItemSubclass == "热老化处理后")) ||
                (row.inspectionItem == "断裂伸长率" &&
                  (row.inspectionItemSubclass == "热老化处理前" ||
                    row.inspectionItemSubclass == "热老化处理后"))
              );
            },
          },
        ],
        tagField: {
          insState: {
            select: [],
          },
          insResult: {
            select: [
              {
                value: 1,
                label: "合格",
                type: "success",
              },
              {
                value: 0,
                label: "不合格",
                type: "danger",
              },
              {
                value: 3,
                label: "不判定",
                type: "",
              },
            ],
          },
        },
        selectField: {},
        spanConfig: {
          rows: [
            // {
            //   name: "entrustCode",
            //   index: 0,
            // },
            // {
            //   name: "sampleCode",
            //   index: 1,
            // },
          ],
        },
        requiredAdd: [],
        requiredUp: [],
      },
      dataDialogVisible: false,
      upIndex: 0,
      planTotal: 0,
      state: 0, //0:台账页,1:检验页面,2检验页面(复核),默认为0
      activeFace: 0, //1:下单,2:查看,3:审核,默认为0
      currentId: null,
      entityCopy: {},
      orderId: 0,
      personList: [],
      connectVisible: false,
      connect: {
        connectPerson: "",
        sonLaboratory: "",
      },
      loading: false,
      currentTime: null,
      sonLaboratoryList: [],
      userNameList: [],
      currentRow: null,
      insProductVOSData: [],
      insSampleListData: [],
      currentMonthPlanTotal: 0,
    };
  },
  created() {
    this.getLaboratoryDicts();
    this.getTypeDicts();
    this.getInsStateDicts();
    this.getAuthorizedPerson();
    this.currentTime = getYearAndMonthAndDays();
    this.getTableHeight();
    this.handleResize();
  },
  mounted() {
    window.addEventListener("resize", this.getTableHeight);
    // ç›‘听窗口大小改变事件
    window.addEventListener("resize", this.handleResize);
  },
  beforeDestroy() {
    window.removeEventListener("resize", this.getTableHeight);
    window.removeEventListener("resize", this.handleResize);
  },
  watch: {
    more() {
      this.getTableHeight();
    },
    tabsData() {
      this.$nextTick(() => {
        this.$refs.showResultTable &&
          this.$refs.showResultTable.forEach((e) => e.doLayout());
      });
    },
  },
  computed: {
    title() {
      return this.selectTab + "检验结果显示";
    },
    isLeader() {
      const power = JSON.parse(sessionStorage.getItem("power"));
      if (power) {
        const filterList = power.filter((ele) => ele.menuMethod == "leader");
        return filterList.length > 0;
      }
      return false;
    },
  },
  methods: {
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    getList() {
      this.tableLoading = true;
      selectInsOrderPlanList({ ...this.queryParams, ...this.page })
        .then((res) => {
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
          this.tableLoading = false;
        })
        .catch((error) => {
          this.tableLoading = false;
          console.error(error);
        });
    },
    getCurrentMonthPlanTotal() {
      let startTime = null;
      let endTime = null;
      if (this.queryParams.sendTimeRange.length > 1) {
        startTime = this.queryParams.sendTimeRange[0].replace("T", " ");
        endTime = this.queryParams.sendTimeRange[1].replace("T", " ");
      }
      getCurrentMonthPlanTotal({
        sonLaboratory: this.queryParams.sonLaboratory,
        startTime: startTime,
        endTime: endTime,
      })
        .then((res) => {
          if (res.code === 200) {
            this.currentMonthPlanTotal = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    // å®šä¹‰ä¸€ä¸ªå‡½æ•°æ¥å¤„理视口宽度变化
    handleResize() {
      //视口宽度
      let windowWidth = window.innerWidth;
      //减去左边菜单栏宽度200,页边距40,右边的操作按钮宽度viewportWidth*33.33333%
      let viewportWidth = windowWidth - 200 - 40;
      //搜索表单最大宽度
      let formMaxWidth = viewportWidth - viewportWidth * 0.3333333;
      //单个搜索框宽度为230
      this.maxNum = formMaxWidth / 250;
    },
    // æŸ¥çœ‹è¯¦æƒ…
    viewDetails(row) {
      this.dialogVisible = true;
      if (
        row.inspectionItem.includes("松套管") ||
        row.inspectionItemSubclass.includes("松套管")
      ) {
        this.type = "松套管";
      } else {
        this.type = row.inspectionItem;
      }
      let data = {
        inspectionItem: row.inspectionItem,
        inspectionItemSubclass: row.inspectionItemSubclass,
        insProductId: row.insProductId,
        insSampleId: row.insSampleId,
        entrustCode: row.entrustCode,
        sampleCode: row.sampleCode,
      };
      viewDetails(data)
        .then((res) => {
          if (res.code === 200) {
            this.viewDetailsList = res.data;
            if (res.data[0].tableHeader) {
              this.tableHeader = res.data[0].tableHeader;
            } else {
              this.tableHeader = [
                {
                  testValue0: "",
                },
              ];
            }
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    handleCommand(command) {
      switch (command) {
        case "showInsResults":
          //查询检验结果
          this.excelExport();
          break;
        case "exportFees":
          //导出委托费用
          this.commissionFeesDialogVisible = true;
          break;
        case "exportUnInsProducts":
          //导出待检信息
          this.unInsDialogVisible = true;
          break;
      }
    },
    // å¯¼å‡ºå§”托费用
    exportcommissionFees() {
      this.$refs.exportFees.validate((valid) => {
        if (valid) {
          let data = {
            startTime: this.exportFees.commissionFeesDate[0],
            endTime: this.exportFees.commissionFeesDate[1],
          };
          exportCommissionFees(data)
            .then((res) => {
              transformExcel(res, "委托费用统计.xlsx");
              this.$nextTick(() => {
                this.$message.success("导出成功");
                this.commissionFeesDate = null;
                this.commissionFeesDialogVisible = false;
              });
            })
            .catch((error) => {
              console.error(error);
            });
        }
      });
    },
    handleCloseCommissionFees() {
      this.exportFees.commissionFeesDate = null;
      this.commissionFeesDialogVisible = false;
      this.$refs.exportFees.resetFields();
    },
    // å¯¼å‡ºå¾…检任务
    exportUnInsProductsFun() {
      this.$refs.exportUnInsProducts.validate((valid) => {
        if (valid) {
          let data = {
            startDate: this.unInsProductsData.sendTime[0],
            endDate: this.unInsProductsData.sendTime[1],
            entrustCode: this.queryParams.entrustCode,
            insState: this.queryParams.insState,
            sampleCode: this.queryParams.sampleCode,
            sample: this.queryParams.sample,
            sonLaboratory: this.queryParams.sonLaboratory,
          };
          console.log(data);
          exportUnInsProducts(data)
            .then((res) => {
              transformExcel(res, "待检任务统计.xlsx");
              this.$nextTick(() => {
                this.$message.success("导出成功");
                this.handleCloseUnInsDialog();
              });
            })
            .catch((error) => {
              console.error(error);
            });
        }
      });
    },
    handleCloseUnInsDialog() {
      this.unInsProductsData.sendTime = [];
      this.unInsDialogVisible = false;
      this.$refs.exportUnInsProducts.resetFields();
    },
    //前往复核按钮权限校验
    premissionReviewFun() {
      if (this.currentRow) {
        let row = this.currentRow;
        return !(
          row.userName == null ||
          row.insState != 3 ||
          (row.checkName && !row.checkName.includes(this.nickName))
        );
      }
    },
    //前往复核方法
    goReview(currentRow) {
      this.dataDialogVisible = false;
      this.$nextTick(() => {
        this.handleReview(currentRow);
      });
    },
    //查看检验结果-计算表格列宽度
    calcTableColumnWidth(columnName) {
      let width = 120;
      if (columnName) {
        let clacWidth = 20 * columnName.length;
        width = clacWidth > width ? clacWidth : width;
      }
      return width;
    },
    getTableHeight() {
      const outherMainHeight = this.more ? 386 : 336; //主表格其余高度
      const otherHeight = 320; // å…¶ä½™é«˜åº¦
      const tableH = 50; // è·ç¦»é¡µé¢ä¸‹æ–¹çš„高度
      const tableHeightDetil = window.innerHeight - tableH;
      if (tableHeightDetil <= 300) {
        this.tableHeight = 200;
        this.tableMainHeight = 200;
      } else {
        this.tableHeight = window.innerHeight - tableH - otherHeight;
        this.tableMainHeight = window.innerHeight - tableH - outherMainHeight;
      }
    },
    // å¯¼å‡ºæŸ¥çœ‹ç»“果数据
    excelExportTrends() {
      this.$message.warning("正在导出 è¯·ç¨åŽ...");
      this.outLoading = true;
      exportInsOrderPlanResult({
        sampleType: this.tabName,
        sonLaboratory: this.selectTab,
        entrustCode: this.excelForm.entrustCode,
        sampleCode: this.excelForm.sampleCode,
        createUser: this.excelForm.sampleName,
        insTime: this.excelForm.dateTime,
        headerS: JSON.stringify(this.tableHeader),
      })
        .then((res) => {
          this.outLoading = false;
          this.$message.success("导出成功");
          const blob = new Blob([res], { type: "application/octet-stream" });
          const url = URL.createObjectURL(blob);
          const link = document.createElement("a");
          link.href = url;
          link.download = "检验结果.xlsx";
          link.click();
        })
        .catch((error) => {
          console.error(error);
        });
    },
    handleClose3() {
      this.dialogVisible = false;
    },
    handleSizeChange(val) {
      this.pageSize = val;
      let table = JSON.parse(JSON.stringify(this.trendsTable));
      this.tabsData = table.slice(0, val);
      console.log(`每页 ${val} æ¡`);
    },
    handleCurrentChange(val) {
      let table = JSON.parse(JSON.stringify(this.trendsTable));
      this.tabsData = table.slice(
        (val - 1) * this.pageSize,
        val * this.pageSize
      );
      console.log(`当前页: ${val}`);
    },
    handleClick(tab, event) {
      this.tabName = this.tabs[tab.name];
      this.getTabHeader(this.tabs[tab.name]);
    },
    excelSearch() {
      this.getTabHeader(this.tabName);
    },
    // å¯¼å‡ºå¼¹æ¡†èŽ·å–tabs页标签
    excelExport() {
      this.resetForm();
      this.outLoading = false;
      this.activeName = "0";
      if (this.selectTab == null || this.selectTab == "") {
        this.selectTab = this.tabList[0].value;
      }
      this.loadingTable = true;
      getTabHeader({
        sonLaboratory: this.selectTab,
        samples: "",
      })
        .then((res) => {
          if (res.code === 200) {
            this.tabs = res.data.tabHeader;
            this.tabName = this.tabs[0];
            this.getTabHeader(this.tabs[0]); // èŽ·å–åŠ¨æ€è¡¨å¤´
          }
        })
        .catch((error) => {
          console.error(error);
        });
      this.dialogVisibleExcel = true;
    },
    // samples获取动态表头
    getTabHeader(samples) {
      getTabHeader({
        sonLaboratory: this.selectTab,
        samples: samples,
      })
        .then((res) => {
          if (res.code === 200) {
            this.loadingTable = true;
            this.tableHeader = [];
            this.tableHeader = res.data.tableHeader;
            let data = {
              sampleType: samples,
              sonLaboratory: this.selectTab,
              entrustCode: this.excelForm.entrustCode,
              sampleCode: this.excelForm.sampleCode,
              createUser: this.excelForm.sampleName,
              insTime: this.excelForm.dateTime,
              headerS: JSON.stringify(this.tableHeader),
            };
            if (samples == "温度循环") {
              // èŽ·å–è¡¨æ ¼æ•°æ®
              getInsOrderTemList(data)
                .then((res) => {
                  if (res.code === 200) {
                    this.tabsData = [];
                    this.trendsTable = res.data;
                    // åˆ†é¡µ
                    this.total = this.trendsTable.length;
                    this.tabsData = res.data.slice(0, this.pageSize);
                    this.loadingTable = false;
                  }
                })
                .catch((error) => {
                  console.error(error);
                });
            } else {
              // èŽ·å–è¡¨æ ¼æ•°æ®
              getInsOrderPlanList(data)
                .then((res) => {
                  if (res.code === 200) {
                    this.tabsData = [];
                    this.trendsTable = res.data;
                    // åˆ†é¡µ
                    this.total = this.trendsTable.length;
                    this.tabsData = res.data.slice(0, this.pageSize);
                    this.loadingTable = false;
                  }
                })
                .catch((error) => {
                  console.error(error);
                });
            }
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    // æ¸…空表单
    resetForm() {
      this.excelForm = {
        entrustCode: null,
        sampleCode: null,
        sampleName: null,
        dateTime: null,
      };
    },
    // æ•°æ®æŸ¥çœ‹
    handleDataLook(row) {
      this.dataLookTableLoading = true;
      selectSampleAndProductByOrderId({ id: row.id })
        .then((res) => {
          if (res.code === 200) {
            this.dataLooktableData = res.data;
          }
          this.dataLookTableLoading = false;
        })
        .catch((error) => {
          console.error(error);
          this.dataLookTableLoading = false;
        });
      this.dataDialogVisible = true;
    },
    changeCheckBox(val) {
      this.queryParams.userId = val ? 0 : null;
      this.refreshTable();
    },
    refresh() {
      if (this.tabList.length > 0) {
        this.tabIndex = 0;
        this.queryParams.sonLaboratory = this.tabList[0].value;
      }
      this.refreshTable();
    },
    claimFun(row) {
      if (row) {
        this.sampleUserForm = {
          entrustCode: row.entrustCode,
          insSampleId: row.id,
          sonLaboratory: row.sonLaboratory,
        };
        this.claimVisible = true;
      }
    },
    confirmClaim() {
      this.loading = true;
      claimInsOrderPlan(this.sampleUserForm)
        .then((res) => {
          if (res.code === 200 && res.data) {
            this.loading = false;
            this.$message.success("认领成功");
            this.claimVisible = false;
            this.refreshTable("page");
          }
        })
        .catch((error) => {
          console.error(error);
          this.loading = false;
        });
    },
    refreshTable() {
      this.getList();
      this.$nextTick(() => {
        this.getCurrentMonthPlanTotal();
      });
    },
    changeRowClass({ row, rowIndex }) {
      if (this.currentTime == row.appointed) {
        return "highlight-warning-row-border";
      } else if (this.currentTime > row.appointed) {
        return "highlight-danger-row-border";
      }
      return "";
    },
    onReset() {
      this.searchForm = {
        sampleName: null,
        state: null,
      };
      this.componentData.entity.insState = null;
      this.componentData.entity.sampleName = null;
      this.refreshTable();
    },
    onSubmit() {
      this.componentData.entity.insState = this.searchForm.state;
      this.componentData.entity.sampleName = this.searchForm.sampleName;
      this.$nextTick(() => {
        this.refreshTable();
      });
    },
    handleTab(m, i) {
      console.log("aaa", m, i);
      this.selectTab = m.value;
      this.tabIndex = i;
      this.queryParams.sonLaboratory = m.value;
      this.refreshTable();
    },
    getTypeDicts() {
      getDicts("urgency_level")
        .then((res) => {
          if (res.code === 200) {
            this.urgencyDictList = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    getInsStateDicts() {
      getDicts("inspection_task_state")
        .then((res) => {
          if (res.code === 200) {
            this.insStateList = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      // this.$axios
      //   .post(this.$api.enums.selectEnumByCategory, {
      //     category: "",
      //   })
      //   .then((res) => {
      //     let data = res.data;
      //     data.forEach((ele) => {
      //       //0:待检验 1:检验中 2:已检验 3:待复核 4:复核未通过 5:复核通过
      //       if (["2", "5"].includes(ele.value)) {
      //         ele.type = "success";
      //       } else if (["1", "3"].includes(ele.value)) {
      //         ele.type = "warning";
      //       } else if (["0", "4"].includes(ele.value)) {
      //         ele.type = "danger";
      //       }
      //     });
      //     this.componentData.tagField.insState.select = data;
      //   });
    },
    getLaboratoryDicts() {
      getDicts("sys_sub_lab")
        .then((res) => {
          if (res.code === 200) {
            this.tabList = res.data.map((ele) => {
              return {
                label: ele.dictLabel,
                value: ele.dictValue,
              };
            });
            if (this.tabList.length > 0) {
              this.queryParams.sonLaboratory = this.tabList[0].value;
            }
            this.refreshTable();
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    selectAllByOne(row) {
      this.$router.push({
        name: "showDetails",
        query: {
          active: 2,
          currentId: row.id,
          examine: 1,
          isPlan: true,
        },
      });
    },
    //查看委托单基本信息
    selectOrderInfo(row) {
      if (row) {
        getSampleInfoByOrderId({
          id: row.id,
          sonLaboratory: row.sonLaboratory,
        })
          .then((res) => {
            if (res.code == 200) {
              this.insSampleListData = res.data.insSamples;
              this.insProductVOSData = res.data.insProductVOS;
            }
          })
          .catch((error) => {
            console.error(error);
          });
      }
      this.$nextTick(() => {
        this.orderInfoDialog = true;
      });
    },
    playOrder(num) {
      this.activeFace = num;
    },
    goback() {
      this.state = 0;
      this.refreshTable("page");
    },
    handleInspection(row) {
      //当前检验任务的检验人列表
      let inspectorList = [];
      if (row.userName) {
        inspectorList = row.userName.split(",");
      }
      inspectorList.push(this.nickName);
      this.inspectorList = inspectorList;
      this.state = 1;
      this.orderId = row.id;
    },
    handleConnect(row) {
      this.orderId = row.id;
      this.connect = {
        connectPerson: "",
        sonLaboratory: "",
      };
      this.userNameList = row.userName.split(",");
      this.connectVisible = true;
      upPlanUser2({
        orderId: this.orderId,
      })
        .then((res) => {
          if (res.code === 200 && res.data.length > 0) {
            this.sonLaboratoryList = [];
            res.data.forEach((m) => {
              this.sonLaboratoryList.push({
                value: m,
                label: m,
              });
            });
            this.connect.sonLaboratory = row.sonLaboratory;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    confirmConnect() {
      if (
        this.connect.connectPerson == null ||
        this.connect.connectPerson == "" ||
        this.connect.connectPerson == undefined
      ) {
        this.$message.error("未选择交接人员");
        return;
      }
      if (
        this.connect.sonLaboratory == null ||
        this.connect.sonLaboratory == "" ||
        this.connect.sonLaboratory == undefined
      ) {
        this.$message.error("未选择试验室");
        return;
      }
      this.loading = true;
      upPlanUser({
        orderId: this.orderId,
        userId: this.connect.connectPerson,
        sonLaboratory: this.connect.sonLaboratory,
      })
        .then((res) => {
          if (res.code === 200) {
            this.loading = false;
            this.$message.success("操作成功");
            this.refreshTable("page");
          }
          this.connectVisible = false;
        })
        .catch((error) => {
          console.error(error);
          this.loading = false;
        });
    },
    handleReview(row) {
      this.state = 2;
      this.orderId = row.id;
    },
    getAuthorizedPerson() {
      getLaboratoryPersonList()
        .then((res) => {
          if (res.code === 200) {
            this.personList = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    handleClose(done) {
      done();
    },
    getStyle() {
      return "height: calc(100% - " + (this.more ? "94" : "44") + "px)";
    },
  },
};
</script>
<style></style>
<style scoped lang="scss">
.ins-order-plan-main .title {
  font-size: 20px;
  color: #3a7bfa;
}
.search {
  background-color: #fff;
  display: flex;
  align-items: center;
}
.search_thing {
  display: flex;
  align-items: center;
  height: 50px;
  width: 230px;
}
.search_label {
  /* width: 90px; */
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 70px);
}
.ins-order-plan-main .search {
  width: 100%;
  margin-bottom: 10px;
  height: 80px;
  background-color: #fff;
  border-radius: 3px;
}
.search .form-inline {
  height: 50px;
  padding-top: 20px;
  padding-left: 20px;
}
.tab {
  list-style-type: none;
  display: flex;
  padding-inline-start: 0px;
}
.tab li {
  line-height: 24px;
  padding: 6px 14px;
  font-size: 14px;
  color: #333333;
  border: 1px solid #eeeeee;
  cursor: pointer;
}
.tab li:nth-child(1) {
  border-radius: 8px 0 0 8px;
}
.tab li:nth-last-child(1) {
  border-radius: 0 8px 8px 0;
}
.tab li.active {
  border-color: #3a7bfa;
  color: #3a7bfa;
}
.center .center-options .center-title {
  display: flex;
  align-items: center;
  justify-content: right;
  text-align: right;
  span:last-child {
    color: #3a7bfa;
    font-size: 23px;
    font-weight: 400;
  }
  p:last-child {
    margin-left: 20px;
  }
}
.view-self-checkbox {
  margin-left: 50px;
}
.ins-order-plan-main .el-form-item__label {
  color: #000;
}
.ins-order-plan-main .el-table th.el-table__cell > .cell {
  height: 46px;
  line-height: 30px;
}
</style>