spring
2025-03-19 36fc9186e39f2fd317603728b4ad3482a91b079b
合并装备代码
已修改39个文件
已重命名2个文件
2202 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/styles/sidebar.scss 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Preview/filePreview.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/lims-table.vue 180 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/UpPdfStamp/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/SidebarItem.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/permission.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/dict/DictOptions.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/excelFountion.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/personnel/personnelInfo/components/Edit.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/demand/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/finishedProductSampling/components/addQuarterItem.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionReview/index.vue 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/components/InspectionWord.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/copperOrder.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/customsInspection.vue 547 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/add.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/auxiliaryWireCore.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/cable-config.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/components/printDialog.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productOrder/index.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productSamplingInfo/components/addQuarterItem.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/productSamplingInfo/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/components/PurchaseVerification.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/unpass/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/performance/manHour/workTimeConfig.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/thirdpartylogin.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/workers/DataWorker.worker.js 补丁 | 查看 | 原始文档 | blame | 历史
src/workers/InspectionWorker.worker.js 912 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -41,6 +41,7 @@
    "@vue-office/excel": "^1.7.14",
    "@vue/composition-api": "^1.7.2",
    "axios": "0.28.1",
    "big.js": "^6.2.2",
    "clipboard": "2.0.8",
    "core-js": "3.37.1",
    "dom-to-image": "^2.6.0",
src/assets/styles/sidebar.scss
@@ -1,17 +1,18 @@
#app {
  .main-container {
    height: 100%;
    transition: margin-left 0.28s;
    transition: margin-left .28s;
    margin-left: $base-sidebar-width;
    position: relative;
  }
  .sidebarHide {
    margin-left: 0 !important;
    margin-left: 0!important;
  }
  .sidebar-container {
    -webkit-transition: width 0.28s;
    -webkit-transition: width .28s;
    transition: width 0.28s;
    width: $base-sidebar-width !important;
    background-color: $base-menu-background;
@@ -23,13 +24,12 @@
    left: 0;
    z-index: 1001;
    overflow: hidden;
    -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
    -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
    //box-shadow: 2px 0 6px rgba(0,21,41,.35);
    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out,
        0s padding-right ease-in-out;
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }
    .scrollbar-wrapper {
@@ -70,8 +70,7 @@
      width: 100% !important;
    }
    .el-menu-item,
    .el-submenu__title {
    .el-menu-item, .el-submenu__title {
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
@@ -81,7 +80,7 @@
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background-color: rgba(0, 0, 0, 0.06) !important;
        background-color: rgba(0, 0, 0, 0.08) !important;
      }
    }
@@ -89,16 +88,16 @@
      color: $base-menu-color-active !important;
    }
    & .nest-menu .el-submenu > .el-submenu__title,
    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $base-sidebar-width !important;
      &:hover {
        background-color: rgba(0, 0, 0, 0.06) !important;
        background-color: rgba(0, 0, 0, 0.08) !important;
      }
    }
    & .theme-dark .nest-menu .el-submenu > .el-submenu__title,
    & .theme-dark .nest-menu .el-submenu>.el-submenu__title,
    & .theme-dark .el-submenu .el-menu-item {
      background-color: $base-sub-menu-background !important;
@@ -138,7 +137,7 @@
    .el-submenu {
      overflow: hidden;
      & > .el-submenu__title {
      &>.el-submenu__title {
        padding: 0 !important;
        .svg-icon {
@@ -146,17 +145,18 @@
          height: 1.5em;
          margin-left: 25px;
        }
      }
    }
    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
        &>.el-submenu__title {
          height: auto; /* æ ¹æ®å†…容自动调整高度 */
          flex-direction: column; /* æ”¹å˜å¸ƒå±€æ–¹å‘为垂直 */
          align-items: center; /* å±…中对齐 */
          margin-bottom: 10px;
          & > span {
          &>span {
            display: block !important;
            visibility: visible !important;
            white-space: normal; /* å…è®¸æ¢è¡Œ */
@@ -179,7 +179,7 @@
    }
    .sidebar-container {
      transition: transform 0.28s;
      transition: transform .28s;
      width: $base-sidebar-width !important;
    }
@@ -193,6 +193,7 @@
  }
  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
@@ -202,13 +203,13 @@
// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }
  .nest-menu .el-submenu > .el-submenu__title,
  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
@@ -217,7 +218,7 @@
  }
  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;
src/components/Preview/filePreview.vue
@@ -96,7 +96,6 @@
      if (state) {
        this.imgUrl = this.fileUrl.replaceAll('word', 'img')
      }
      console.log(2222, this.imgUrl)
      return state;
    },
    isPdf() {
src/components/Table/lims-table.vue
@@ -11,10 +11,10 @@
      <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey"
        :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue"
        :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop"
        :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true"
        :sortable="item.sortable ? true : false" :type="item.type"
        :width="item.dataType == 'action' ? btnWidth : item.width" align="center">
        :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop"
                       :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true"
                       :min-width="item.dataType == 'action' ? btnWidth : getTitleWidth(item)"
        :sortable="item.sortable ? true : false" :type="item.type" :width="item.dataType == 'action' ? btnWidth : getTitleWidth(item)" align="center">
        <!-- <div class="123" v-if="item.type == ''"> -->
        <template v-if="item.hasOwnProperty('colunmTemplate')" :slot="item.colunmTemplate" slot-scope="scope">
          <slot v-if="item.theadSlot" :index="index" :name="item.theadSlot" :row="scope.row" />
@@ -63,7 +63,8 @@
          </div>
          <!-- æŒ‰é’® -->
          <div v-else-if="item.dataType == 'action'" :style="`width:${getWidth(item.operation, scope.row)}`">
          <div v-else-if="item.dataType == 'action'"
               :style="`width:${getWidth(item.operation, scope.row)}`">
            <template v-for="(o, key) in item.operation">
              <el-button v-show="o.type != 'upload'" size="mini" v-if="o.showHide ? o.showHide(scope.row) : true"
                :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain"
@@ -72,13 +73,19 @@
                {{ o.name }}
              </el-button>
              <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)"
                size="mini" ref="upload" :multiple="o.multiple ? o.multiple : false" :limit="1"
                         :key="uploadKeys[scope.$index]"
                         ref="uploadRef"
                size="mini" :multiple="o.multiple ? o.multiple : false" :limit="1"
                :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept
                  ? o.accept
                  : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'
                  " v-if="o.type == 'upload'" style="display: inline-block; width: 50px"
                v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader" :on-error="onError"
                :on-exceed="onExceed" :on-success="handleSuccessUp" :show-file-list="false" :key="key">
                         v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader"
                         :before-upload="(file) => beforeUpload(file, scope.$index)"
                         :on-change="(file, fileList) => handleChange(file, fileList, scope.$index)"
                         :on-error="(error, file, fileList) => onError(error, file, fileList, scope.$index)"
                         :on-success="(response, file, fileList) => handleSuccessUp(response, file, fileList, scope.$index)"
                         :on-exceed="onExceed" :show-file-list="false">
                <el-button :size="o.size ? o.size : 'small'" type="text"
                  :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
              </el-upload>
@@ -99,7 +106,7 @@
        </template>
      </el-table-column>
    </el-table>
    <pagination v-if="page" v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current"
    <pagination v-show="page.total > 0" :total="page.total" :layout="page.layout" :page.sync="page.current"
      :limit.sync="page.size" @pagination="pagination" />
  </div>
</template>
@@ -158,7 +165,6 @@
  name: "ZTTable",
  filters: {
    typeFn(val, row) {
      // console.log(val, row, '11111111');
      if (typeof val === "function") {
        return val(row);
      } else return val;
@@ -258,27 +264,61 @@
  data() {
    return {
      spanList: [],
      btnWidth: '120px',
      btnWidth: "120px",
      uploadRefs: [],
      currentFiles: {}, // ç”¨äºŽå­˜å‚¨æ¯è¡Œçš„当前文件
      uploadKeys: {} // ç”¨äºŽåŠ¨æ€é‡ç½®ç»„ä»¶
    };
  },
  mounted() {
    this.calculateSpanInfo();
    this.$nextTick(() => {
      this.$refs.multipleTable.doLayout();
    });
      this.tableData.forEach((_, index) => {
        if (this.$refs.uploadRef) {
          this.$refs.uploadRef[index] = this.$refs.uploadRef[index] || {};
        }
      });
    })
  },
  watch: {
    tableData: {
      handler() {
        // å½“表格数据变化时,初始化 uploadKeys
        this.tableData.forEach((_, index) => {
          this.$set(this.uploadKeys, index, Date.now());
        });
      },
      immediate: true
    }
  },
  methods: {
    getWidth(row) {
    getWidth(row, row0) {
      let count = 0;
      row.forEach((a) => {
        if (a.showHide !== undefined && a.showHide()) {
        if (a.showHide !== undefined && a.showHide(row0)) {
          count += a.name.length;
        } else if (!a.showHide) {
          count += a.name.length;
        }
      });
      this.btnWidth = count * 15 + 80 + "px";
      return count * 15 + 80 + "px";
      this.btnWidth = count * 15 + 50 + "px";
      return count * 15 + 50 + "px";
    },
    getTitleWidth(row) {
      if (row.label.includes('时间') || row.label.includes('编号') || row.label.includes('样品名称') || row.label.includes('零件')) {
        return 160
      } else if (row.label.includes('操作')) {
        return row.width
      } else {
        const span = document.createElement('span');
        span.innerText = row.label;
        document.body.appendChild(span);
        const width = `${span.offsetWidth + 50}px`;
        document.body.removeChild(span);
        return width;
      }
    },
    iconFn(row) {
      if (row.name === "编辑" || row.name === "修改") {
@@ -290,9 +330,6 @@
      } else {
        return row.icon;
      }
      // if (typeof (val) === 'function') {
      //   return val(row);
      // } else return val;
    },
    formatType(val, format) {
      if (typeof format === "function") {
@@ -307,21 +344,53 @@
    setCurrent(row) {
      this.$refs.multipleTable.setCurrentRow();
    },
    handleSuccessUp(response, label) {
      if (typeof label === "string") {
        if (response.code == 200) {
          this.upData[label] = response.data.url;
    handleSuccessUp(response, file, fileList, index) {
      if (response.code == 200) {
        // æ¸…除文件列表并更新当前文件
        if (this.uploadRefs[index]) {
          this.uploadRefs[index].clearFiles();
        }
        this.currentFiles[index] = file;
        this.$message.success("上传成功");
        // é‡ç½®ç»„件状态
        this.resetUploadComponent(index);
      } else {
        if (response.code == 200) {
          this.$message.success("上传成功");
        }
        this.$message.error(response.message);
      }
    },
    onError(err, file, fileList) {
      this.$message.error("上传失败");
      this.$refs.upload.clearFiles();
      this.uploading = false;
    resetUploadComponent(index) {
      // åŠ¨æ€æ”¹å˜ key æ¥å¼ºåˆ¶é‡ç½®ç»„ä»¶
      this.uploadKeys[index] = Date.now(); // ä½¿ç”¨æ—¶é—´æˆ³ä½œä¸ºæ–°çš„ key
    },
    handleChange(file, fileList, index) {
      // å¦‚果文件数量超过限制,移除最早的文件
      if (fileList.length > 1) {
        // ç§»é™¤æœ€æ—©çš„æ–‡ä»¶
        const earliestFile = fileList[0];
        this.uploadRefs[index].handleRemove(earliestFile);
      }
      // æ›´æ–°å½“前文件
      this.currentFiles[index] = file;
    },
    beforeUpload (file, index) {
      this.currentFiles[index] = {}
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        // this.$refs.upload.clearFiles()
        return false;
      } else {
        return true;
      }
    },
    onError(error, file, fileList, index) {
      this.$message.error('文件上传失败,请重试');
      // æ¸…除文件列表
      if (this.uploadRefs[index]) {
        this.uploadRefs[index].clearFiles();
      }
    },
    onExceed() {
      this.$message.warning("超出文件个数");
@@ -330,7 +399,6 @@
      this.$emit("pagination", { page: page, limit: limit });
    },
    indexMethod(index) {
      // return index * 2;
      return (this.page.current - 1) * this.page.size + index + 1;
    },
    // ç‚¹å‡»å•元格link事件
@@ -399,40 +467,7 @@
          };
        }
      }
      // // ç‰¹æ®Šçš„合并行
      // if (
      //   this.data.spanConfig != undefined &&
      //   this.data.spanConfig.special &&
      //   this.data.spanConfig.special.main &&
      //   this.data.spanConfig.special.rows &&
      //   this.data.spanConfig.special.rows.length > 0
      // ) {
      //   let i = null;
      //   let obj = this.data.spanConfig.special.rows.find((item, index) => {
      //     i = index;
      //     return item.index == columnIndex;
      //   });
      //   if (obj) {
      //     const _row = this.specialSpanList[i].arr[rowIndex];
      //     const _col = _row > 0 ? 1 : 0;
      //     return {
      //       rowspan: _row,
      //       colspan: _col,
      //     };
      //   }
      // }
    },
    // å›žæ˜¾å¤šé€‰é€‰ä¸­çŠ¶æ€
    toggleRowSelection(list) {
      this.$nextTick(() => {
        this.tableData.forEach(row => {
          let obj = list.find(m => m == row[this.rowKey])
          if (obj) {
            this.$refs.multipleTable.toggleRowSelection(obj, true);
          }
        });
      });
    }
  },
};
</script>
@@ -442,10 +477,13 @@
  text-align: center;
}
.link {
  color: rgb(64, 158, 255);
  cursor: pointer;
}
>>>.cell {
  padding: 0 !important;
}
.cell {
  white-space: nowrap;
  overflow: hidden;
@@ -454,17 +492,10 @@
  padding-left: 10px !important;
}
.link {
  color: rgb(64, 158, 255);
  cursor: pointer;
}
>>>.el-table__body-wrapper::-webkit-scrollbar {
  height: 10px;
  /* è®¾ç½®æ»šåŠ¨æ¡å®½åº¦ */
}
</style>
<style>
.lims-table .highlight-warning-row-border td:first-child {
  border-left: 4px solid #ffcd29;
}
@@ -472,11 +503,6 @@
.lims-table .highlight-warning-row-border td:last-child {
  border-right: 4px solid #ffcd29;
}
/* .lims-table .highlight-danger-row-border td {
        border-top: 2px solid red;
        border-bottom: 2px solid red;
    } */
.lims-table .highlight-danger-row-border td:first-child {
  border-left: 4px solid #f56c6c;
src/components/UpPdfStamp/index.vue
@@ -125,7 +125,6 @@
    // æ¸²æŸ“ç« 
    drawStamps(x, y, index) {
      var img = new Image();
      console.log(this.stampsName)
      // è®¾ç½®å›¾ç‰‡æº
      img.src = require("@/assets/stamps/" + this.stampsName + ".png"); // æ›¿æ¢ä¸ºä½ çš„图片链接
      let that = this
src/layout/components/Sidebar/SidebarItem.vue
@@ -1,10 +1,9 @@
<template>
  <div v-if="!item.hidden">
    <template
      v-if="hasOneShowingChild(item.children, item) && (!onlyOneChild.children || onlyOneChild.noShowingChildren) && !item.alwaysShow">
    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }">
          <item :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)" :title="onlyOneChild.meta.title" />
        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
        </el-menu-item>
      </app-link>
    </template>
@@ -13,8 +12,14 @@
      <template slot="title">
        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
      </template>
      <sidebar-item v-for="(child, index) in item.children" :key="child.path + index" :is-nest="true" :item="child"
        :base-path="resolvePath(child.path)" class="nest-menu" />
      <sidebar-item
        v-for="(child, index) in item.children"
        :key="child.path + index"
        :is-nest="true"
        :item="child"
        :base-path="resolvePath(child.path)"
        class="nest-menu"
      />
    </el-submenu>
  </div>
</template>
@@ -70,7 +75,7 @@
      // Show parent if there are no child router to display
      if (showingChildren.length === 0) {
        this.onlyOneChild = { ...parent, path: '', noShowingChildren: true }
        this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
        return true
      }
@@ -96,4 +101,4 @@
::v-deep .el-submenu__title i {
  color: #ffffff !important;
}
</style>
</style>
src/permission.js
@@ -9,7 +9,7 @@
NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register']
const whiteList = ['/login', '/register', '/thirdpartylogin', '/logindemo']
const isWhiteList = (path) => {
  return whiteList.some(pattern => isPathMatch(pattern, path))
src/router/index.js
@@ -74,7 +74,7 @@
    hidden: true,
  },
  {
    path: "",
    path: "/",
    component: Layout,
    redirect: "index",
    children: [
src/utils/dict/DictOptions.js
@@ -8,7 +8,6 @@
       * å­—典请求,方法签名为function(dictMeta: DictMeta): Promise
       */
      request: (dictMeta) => {
        console.log(`load dict ${dictMeta.type}`)
        return Promise.resolve([])
      },
      /**
src/utils/excelFountion.js
@@ -46,7 +46,6 @@
    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);
      }
@@ -255,7 +254,6 @@
    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"
src/views/CNAS/personnel/personnelInfo/components/Edit.vue
@@ -371,7 +371,7 @@
      }
    },
    getUserList(){
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        this.userList = res.data;
      })
    },
src/views/CNAS/process/demand/index.vue
@@ -17,7 +17,7 @@
        <el-form-item label="委托人" prop="commissionUser">
          <el-input v-model="entitySearch.commissionUser" clearable placeholder="请输入" size="small"
            @keyup.enter.native="refreshTable()"></el-input>
        </el-form-item>
        </el-form-item>li
        <el-form-item>
          <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 ç½®</el-button>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 è¯¢</el-button>
@@ -29,14 +29,14 @@
    </div>
    <div class="table">
      <el-table v-loading="tableListLoading" :data="tableList"
                height="630" style="width: 100%" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
        <el-table-column align="center" label="序号" type="index" width="60"></el-table-column>
        <el-table-column label="试样名称" prop="sampleName" show-overflow-tooltip width="120"></el-table-column>
        <el-table-column label="委托编号" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column>
        <el-table-column label="委托时间" prop="commissionDate" width="120"></el-table-column>
        <el-table-column label="型号" prop="modelNo"></el-table-column>
        <el-table-column label="委托单位" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column>
        <el-table-column label="生产单位" prop="production" show-overflow-tooltip width="120"></el-table-column>
                height="630" border :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
        <el-table-column align="center" label="序号" type="index"></el-table-column>
        <el-table-column label="试样名称" prop="sampleName" show-overflow-tooltip></el-table-column>
        <el-table-column label="委托编号" prop="entrustCode" show-overflow-tooltip></el-table-column>
        <el-table-column label="委托时间" prop="commissionDate" show-overflow-tooltip></el-table-column>
        <el-table-column label="型号" prop="modelNo" show-overflow-tooltip></el-table-column>
        <el-table-column label="委托单位" prop="commissionUnit" show-overflow-tooltip></el-table-column>
        <el-table-column label="生产单位" prop="production" show-overflow-tooltip></el-table-column>
        <el-table-column label="委托人" prop="commissionUser"></el-table-column>
        <el-table-column label="样品数量" prop="quantity"></el-table-column>
        <el-table-column label="样品状态" prop="sampleStatus"></el-table-column>
@@ -46,7 +46,7 @@
            <span v-if="scope.row.isLeave === 0">否</span>
          </template>
        </el-table-column>
        <el-table-column label="样品处理方式" prop="processing">
        <el-table-column label="样品处理方式" prop="processing" width="150">
          <template slot-scope="scope">
            <span v-if="scope.row.processing === 1">实验室处理</span>
            <span v-if="scope.row.processing === 0">委托单位取回</span>
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
@@ -254,7 +254,7 @@
      this.$emit('closeCarryOutDia')
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue
@@ -296,7 +296,7 @@
      })
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
@@ -162,7 +162,7 @@
      this.$emit('closeDia')
    },
    getUserList(){
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        this.userList = res.data;
      })
    },
src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue
@@ -449,7 +449,7 @@
      this.$emit('closeProcessingDia')
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
@@ -376,7 +376,7 @@
      this.$emit('closeRecordsDia')
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue
@@ -406,7 +406,7 @@
      this.showStep = step
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 1 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue
@@ -200,7 +200,6 @@
          minWidth: '160'
        }, {
          dataType: 'action',
          minWidth: '170',
          label: '操作',
          fixed: 'right',
          operation: [
@@ -284,7 +283,6 @@
          minWidth: '150px'
        }, {
          dataType: 'action',
          width: '260',
          label: '操作',
          fixed: 'right',
          operation: [
@@ -473,7 +471,7 @@
      this.getUserList()
    },
    getUserList() {
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition({ type: 2 }).then((res) => {
        this.userList = res.data;
      })
    },
src/views/business/finishedProductSampling/components/addQuarterItem.vue
@@ -279,7 +279,7 @@
      }
    },
    getUserList(){
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition().then((res) => {
        this.userList = res.data;
      })
    },
src/views/business/inspectionReview/index.vue
@@ -23,8 +23,8 @@
    </div>
    <div>
      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
        :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
        key="tableData0"></lims-table>
                  :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
                  key="tableData0"></lims-table>
    </div>
    <!--报告查看-->
    <el-dialog title="报告查看" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
@@ -108,7 +108,18 @@
          prop: "type",
          dataType: "tag",
          formatData: (params) => {
            return this.urgencyLevel.find((m) => m.value == params).label;
            if (this.urgencyLevel.find((m) => m.value == params)) {
              return this.urgencyLevel.find((m) => m.value == params).label;
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (this.urgencyLevel.find((m) => m.value == params)) {
              return this.urgencyLevel.find((m) => m.value == params).type;
            } else {
              return null
            }
          },
        },
        {
@@ -128,11 +139,18 @@
          prop: "insState",
          dataType: "tag",
          formatData: (params) => {
            return this.inspectionTaskState.find((m) => m.value == params)
              .label;
            if (this.inspectionTaskState.find((m) => m.value == params)) {
              return this.inspectionTaskState.find((m) => m.value == params).label;
            } else {
              return null
            }
          },
          formatType: (params) => {
            return this.inspectionTaskState.find((m) => m.value == params).type;
            if (this.inspectionTaskState.find((m) => m.value == params)) {
              return this.inspectionTaskState.find((m) => m.value == params).type;
            } else {
              return null
            }
          },
        },
        { label: "检验人", prop: "userName" },
@@ -229,10 +247,10 @@
      fullscreen: false,
      option: null,
      orderTypeList: [
        { label: '委托试验', value: 'Customer-ordered test' },
        { label: '抽检', value: '抽检' },
        { label: '进厂检验', value: '进厂检验' },
        { label: '季度检验', value: 'Quarterly inspection' },
        { label: '委托试验', value: 'Customer-ordered test', type: 'success' },
        { label: '抽检', value: '抽检', type: 'danger' },
        { label: '进厂检验', value: '进厂检验', type: 'info' },
        { label: '季度检验', value: 'Quarterly inspection', type: '' },
      ],
      urgencyLevel: [],
      inspectionTaskState: [],
@@ -286,13 +304,6 @@
      }
      return "";
    },
    // æŸ¥çœ‹äº§ä¸šé“¾ä¿¡æ¯
    // openInfoDialog (row) {
    //   this.showInfoDialog = true
    //   this.$nextTick(() => {
    //     this.$refs.showInfoDialog.getInfo(row.ifsInventoryId)
    //   })
    // },
    selectAllByOne(row) {
      this.isCopper = row.isCopper
      this.customsInspection = row
@@ -373,10 +384,6 @@
    // æŸ¥çœ‹æŠ¥å‘Š
    handleIssued(row) {
      // todo: æŸ¥çœ‹æŠ¥å‘Šç»„ä»¶
/*      if (!row.tempUrlPdf) return this.$message.warning('文件未上传')
      this.currentInfo = row
      this.lookDialogVisible = true*/
      console.log(this.javaApi)
      this.currentInfo = row;
      let fileName = row.url
      let fileType = "docx"
src/views/business/inspectionTask/components/InspectionWord.vue
@@ -1919,7 +1919,7 @@
      }
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition({ type: 1 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/business/inspectionTask/index.vue
@@ -50,7 +50,50 @@
        </div>
        <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
          :rowClassName="rowClassName" :height="'calc(100vh - 300px)'" @pagination="pagination"
          key="tableData0"></lims-table>
          key="tableData0">
          <div slot="action" slot-scope="scope">
            <el-button size="small" type="text" @click="handleDataLook(scope.row)">数据查看</el-button>
            <el-button type="text" size="small"
                       :disabled="(scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5) && checkPermi(['update:product:onPlan'])"
                       @click="editInspection(scope.row)">修改检验值</el-button>
            <el-button type="text" size="small" :disabled="(
                  scope.row.userName == null ||
                  scope.row.insState == 3 ||
                  scope.row.insState == 5 ||
                  (scope.row.userName && !scope.row.userName.includes(nickName))
                )"
                       @click="handleInspection(scope.row)">检验</el-button>
            <el-button type="text" size="small" :disabled="(
                  scope.row.userName == null ||
                  scope.row.insState == 5 ||
                  scope.row.insState == 3 ||
                  (scope.row.userName && !scope.row.userName.includes(nickName))
                )"
                       @click="handleConnect(scope.row)">交接</el-button>
            <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">原始记录</el-button>
            <el-popover placement="bottom" trigger="hover" style="margin-left: 6px">
              <template #reference>
                <el-button link type="text" size="small">更多</el-button>
              </template>
              <div>
                <el-button :disabled="scope.row.insState != 3" style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">下载报告</el-button>
                <el-upload ref='upload'
                           :action="javaApi + '/insReport/inReport'"
                           :before-upload="beforeUpload"
                           :data="{id: scope.row.insReportId}"
                           :headers="uploadHeader" :on-error="onError"
                           :on-success="handleSuccessUp"
                           :show-file-list="false"
                           style="display: inline;margin: 0 6px"
                           accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
                  <el-button :disabled="scope.row.insState != 3" size="small" type="text">上传</el-button>
                </el-upload>
                <el-button :disabled="scope.row.insState != 3" type="text" size="small" @click="handleRestore(scope.row)">还原</el-button>
                <el-button :disabled="scope.row.insState != 3" type="text" size="small" @click="handleIssued(scope.row)">查看报告</el-button>
              </div>
            </el-popover>
          </div>
        </lims-table>
      </div>
    </div>
    <el-dialog :visible.sync="claimVisible" title="提示" width="400px">
@@ -91,7 +134,7 @@
      </span>
    </el-dialog>
    <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%">
      <div v-if="dataDialogVisible" style="height: 70vh; overflow-y: auto">
      <div v-if="dataDialogVisible" style="height: 74vh; overflow-y: auto">
        <div>
          <el-form :model="entity" :inline="true">
            <el-form-item label="检验项" prop="outputWorkTime">
@@ -184,6 +227,7 @@
} from "@/api/business/inspectionTask.js";
import { mapGetters } from "vuex";
import {getRetestResult} from "@/api/business/rawMaterialOrder";
import {upReportUrl} from "@/api/business/insReport";
export default {
  name: 'InspectionTask',
  components: {
@@ -363,80 +407,16 @@
        { label: "检验开始时间", prop: "insTime", width: "140px" },
        { label: "理由", prop: "verifyTell", width: "140px" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "数据查看",
              type: "text",
              clickFun: (row) => {
                this.handleDataLook(row);
              },
            },
            {
              name: "修改检验值",
              type: "text",
              clickFun: (row) => {
                this.editInspection(row);
              },
              disabled: (row) => {
                return (row.userName == null || row.insState == 3 || row.insState == 5) && this.checkPermi(['update:product:onPlan'])
              },
            },
            {
              name: "查看工时",
              type: "text",
              clickFun: (row) => {
                this.viewManHour(row);
              },
              showHide: (row) => {
                return this.checkPermi(['get:working:hours:byOrder'])
              },
            },
            {
              name: "检验",
              type: "text",
              clickFun: (row) => {
                this.handleInspection(row);
              },
              disabled: (row) => {
                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) => {
                return (
                  row.userName == null ||
                  row.insState == 5 ||
                  row.insState == 3 ||
                  (row.userName && !row.userName.includes(this.nickName))
                );
              },
            },
            {
              name: "原始记录",
              type: "text",
              clickFun: (row) => {
                this.viewInspectInfo(row);
              },
            },
          ],
        },
          dataType: "slot",
          slot: "action",
          width: '340px',
          label: "操作"
        }
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 0,
      },
      tableLoading: false,
@@ -535,7 +515,7 @@
      ],
      lookPage: {
        total: 0,
        size: 10,
        size: 20,
        current: 0,
      },
      lookTableLoading: false,
@@ -638,6 +618,56 @@
      this.page.current = 1;
      this.queryParams.typeSource = this.tabIndex;
      this.getList();
    },
    // ä¸‹è½½æŠ¥å‘Š
    download(row) {
      let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      const link = document.createElement('a');
      link.href = this.javaApi + url;
      link.target = '_blank';
      document.body.appendChild(link);
      link.click();
    },
    // è¿˜åŽŸæ“ä½œ
    handleRestore(row) {
      this.$confirm('是否还原当前报告?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        upReportUrl({ id: row.insReportId }).then(res => {
          if (res.code === 200) {
            this.$message.success('还原成功')
            this.refreshTable()
          }
        })
      }).catch(() => { })
    },
    // æŸ¥çœ‹æŠ¥å‘Š
    handleIssued(row) {
      // todo: æŸ¥çœ‹æŠ¥å‘Šç»„ä»¶
      this.currentInfo = row;
      let fileName = row.url
      let fileType = "docx"
      if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
        fileName = row.tempUrlPdf
        fileType = "pdf"
      }
      fileName = fileName.replace('/word/','')
      const userName = this.nickName
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: fileType,
        title: fileName,
        lang: 'zh-CN',
        isPrint: false,
        user_id: 1,
        user_name: userName,
        editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
      }
      this.issuedVisible = true;
    },
    // æŸ¥çœ‹äº§ä¸šé“¾ä¿¡æ¯
    openInfoDialog(row) {
@@ -852,7 +882,6 @@
      this.bindCurrentInfo = row;
      getBindingProductByProductId({ productId: row.insProductId })
        .then((res) => {
          // console.log(res)
          this.bindTableData = res.data;
          this.bindDialogVisible = true;
        })
@@ -865,7 +894,6 @@
        productId: this.bindCurrentInfo.insProductId,
      })
        .then((res) => {
          // console.log(res)
          this.bindAddTableData = res.data;
          this.bindAddDialogVisible = true;
        })
@@ -915,6 +943,29 @@
        });
      });
    },
    beforeUpload (file) {
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        return false;
      } else {
        return true;
      }
    },
    onError(error, file, fileList, index) {
      this.$message.error('文件上传失败,请重试');
    },
    onExceed() {
      this.$message.warning("超出文件个数");
    },
    handleSuccessUp(response) {
      if (response.code == 200) {
        this.$refs.upload.clearFiles()
        this.$message.success("上传成功");
      } else {
        this.$message.error(response.message);
      }
    },
  },
};
</script>
src/views/business/inspectionTask/inspection.vue
@@ -541,8 +541,8 @@
  delfile,
  inspectionOrderDetailsTaskSwitching
} from "@/api/business/inspectionTask.js";
import InspectionWorker from '../../../InspectionWorker.worker';
import DataWorker from '../../../DataWorker.worker';
import InspectionWorker from '../../../workers/InspectionWorker.worker';
import DataWorker from '../../../workers/DataWorker.worker';
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
@@ -1133,7 +1133,6 @@
      this.dataAcquisitionInfo = {};
      this.getData = [];
      for (let i in this.objectOrder(data)) {
        console.log("i---", i);
        let obj = {};
        if (i.includes("@")) {
          obj = {
@@ -1476,7 +1475,6 @@
    },
    // ä¿å­˜æ¹¿åº¦ã€æ¸©åº¦æ•°æ®
    subOtherForm(m, type) {
      console.log("m---", m);
      write({
        [type]: type === "remark" ? m : Number(m),
        id: this.insOrder.id,
@@ -2747,7 +2745,7 @@
      }
    },
    getAuthorizedPerson() {
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition({ type: 1 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/business/materialOrder/copperOrder.vue
@@ -1808,4 +1808,11 @@
  justify-content: space-between;
  margin-bottom: 10px;
}
>>>.warning-row {
  color: #1890FF;
}
.node_i {
  color: orange;
  font-size: 18px;
}
</style>
src/views/business/materialOrder/customsInspection.vue
@@ -5,25 +5,23 @@
        <div>
          <span>采购订单信息</span>
          <ul class="tab" v-if="active > 1 && isShowTab">
            <li v-for="(m, i) in dataTitle" :key="i" :class="{ active: i === dataIndex }" @click="handleDataTab(m, i)">
              {{ m.label }}</li>
            <li v-for="(m,i) in dataTitle" :key="i" :class="{active:i===dataIndex}" @click="handleDataTab(m,i)">{{m.label}}</li>
          </ul>
        </div>
        <div>
          <el-select v-show="active == 1" v-model="template" placeholder="下单模板" size="small" style="margin-right: 10px;"
            @change="selectInsOrderTemplateByIdList">
          <el-select v-show="active==1" v-model="template" placeholder="下单模板" size="small" style="margin-right: 10px;"
                     @change="selectInsOrderTemplateByIdList">
            <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
              <span style="float: left">{{ a.name }}</span>
              <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
                @click.stop="handleDelete(a)"></i>
                 @click.stop="handleDelete(a)"></i>
            </el-option>
          </el-select>
          <el-button v-show="active == 1" size="small" @click="templateDia = true">
          <el-button v-show="active==1" size="small" @click="templateDia=true">
            <span style="color: #3A7BFA;">保存模板</span>
          </el-button>
          <el-button v-show="active == 1 && addObj.orderType === '进厂检验'" :loading="noNeedCheckLoad" size="small"
            type="primary" @click="noNeedCheck">免检</el-button>
          <el-button v-show="active == 1" :loading="saveLoad" size="small" type="primary" @click="save">提交</el-button>
          <el-button v-show="active==1 && addObj.orderType === '进厂检验'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">免检</el-button>
          <el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">提交</el-button>
          <el-button size="small" @click="goBack">
            <span style="color: #3A7BFA;">返回</span>
          </el-button>
@@ -35,41 +33,42 @@
        <el-row>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="采购订单号:">
              <el-input v-model="addObj.orderNo" class="addObj-info" clearable disabled placeholder=""
                size="small"></el-input>
              <el-input v-model="addObj.orderNo" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="委托单位:">
              <el-input v-model="addObj.company" class="addObj-info" clearable disabled placeholder=""
                size="small"></el-input>
              <el-input v-model="addObj.company" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="接收时间:">
              <el-date-picker v-model="addObj.receiverDate" disabled placeholder="选择日期" size="small"
                style="width: 100%;" type="date" value-format="yyyy-MM-dd">
              <el-date-picker
                v-model="addObj.receiverDate"
                disabled
                placeholder="选择日期"
                size="small"
                style="width: 100%;"
                type="date"
                value-format="yyyy-MM-dd">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="零件号:">
              <el-input v-model="addObj.partNo" class="addObj-info" clearable disabled placeholder=""
                size="small"></el-input>
              <el-input v-model="addObj.partNo" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="样品名称:">
              <el-input v-model="addObj.sample" class="addObj-info" clearable disabled placeholder=""
                size="small"></el-input>
              <el-input v-model="addObj.sample" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="样品总数:">
              <el-input v-model="addObj.qtyArrived" class="addObj-info" clearable disabled placeholder=""
                size="small"></el-input>
              <el-input v-model="addObj.qtyArrived" class="addObj-info" clearable disabled placeholder="" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
@@ -91,24 +90,22 @@
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="抽检数量:" prop="testQuantity">
              <el-input v-model="addObj.testQuantity" :disabled="active > 1" class="addObj-info" clearable
                placeholder="请填写抽检数量" size="small"></el-input>
              <el-input v-model="addObj.testQuantity" :disabled="active > 1" class="addObj-info"
                        clearable
                        placeholder="请填写抽检数量" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="检验类别:" prop="orderType">
              <el-select v-model="addObj.orderType" :disabled="active > 1 || orderType == 1" clearable size="small"
                style="width: 100%">
                <el-option v-for="a in dict.type.check_type" :key="a.value" :label="a.label"
                  :value="a.value"></el-option>
              <el-select v-model="addObj.orderType" :disabled="active>1 || orderType==1" clearable size="small" style="width: 100%">
                <el-option v-for="a in dict.type.check_type" :key="a.value" :label="a.label" :value="a.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="规格型号:" placeholder="请填写" prop="partDetail">
              <el-tooltip :content="addObj.partDetail" :disabled="!addObj.partDetail">
                <el-input v-model="addObj.partDetail" :disabled="active > 1" clearable class="addObj-info"
                  size="small"></el-input>
                <el-input v-model="addObj.partDetail" :disabled="active > 1" clearable class="addObj-info" size="small"></el-input>
              </el-tooltip>
            </el-form-item>
          </el-col>
@@ -116,24 +113,29 @@
        <el-row>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="紧急程度:" placeholder="请选择" prop="type">
              <el-select v-model="addObj.type" :disabled="active > 1" class="addObj-info" clearable size="small"
                style="width: 100%">
                <el-option v-for="a in dict.type.urgency_level" :key="a.value" :label="a.label"
                  :value="a.value"></el-option>
              <el-select v-model="addObj.type" :disabled="active>1" class="addObj-info" clearable size="small" style="width: 100%">
                <el-option v-for="a in dict.type.urgency_level" :key="a.value" :label="a.label" :value="a.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="约定时间:" prop="appointed">
              <el-date-picker v-model="addObj.appointed" :disabled="active > 1" format="yyyy-MM-dd" placeholder="选择日期"
                size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
              <el-date-picker
                v-model="addObj.appointed"
                :disabled="active > 1"
                format="yyyy-MM-dd"
                placeholder="选择日期"
                size="small"
                style="width: 100%"
                type="date"
                value-format="yyyy-MM-dd">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="备注:">
              <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2 }" :disabled="active > 1"
                :placeholder="active > 1 ? '' : '请输入'" clearable size="small" type="textarea"></el-input>
              <el-input v-model="addObj.remark" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1" :placeholder="active>1 ? '' : '请输入'" clearable
                        size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
@@ -141,146 +143,162 @@
    </div>
    <div>
      <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px">
        <div v-if="active == 1">
        <div v-if="active==1">
          <el-form :inline="true" :model="addObj1" label-width="90px">
            <el-form-item label="样品型号:" style="margin-bottom: 6px;margin-top: 6px">
              <el-select v-model="model" :placeholder="active > 1 ? '' : '请输入'" allow-create clearable
                default-first-option filterable size="small" @change="changeModel">
              <el-select v-model="model" :placeholder="active>1 ? '' : '请输入'"
                         allow-create clearable default-first-option filterable
                         size="small"
                         @change="changeModel">
                <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="检验标准:" style="margin-bottom: 6px;margin-top: 6px">
              <el-select v-model="standardMethodListId" :loading="methodLoad" :placeholder="active > 1 ? '' : '请输入'"
                clearable size="small" @change="changeStandardMethodListId" @focus="methodFocus">
              <el-select v-model="standardMethodListId" :loading="methodLoad"
                         :placeholder="active>1 ? '' : '请输入'" clearable size="small"
                         @change="changeStandardMethodListId" @focus="methodFocus">
                <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="" style="margin-bottom: 6px;margin-top: 6px">
              <el-button type="primary" size="small">车间附件查看</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div style="margin-bottom: 6px;margin-top: 6px">
          <el-button v-show="active == 1" :disabled="sampleList.length === 2" size="small" type="primary"
            @click="handleSplitCountNum">拆分</el-button>
          <el-button v-show="active==1" :disabled="sampleList.length === 2" size="small" type="primary" @click="handleSplitCountNum">拆分</el-button>
        </div>
      </div>
      <el-table ref="sampleTable" :data="sampleList" class="el-table sampleTable" highlight-current-row
        :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border max-height="400px" tooltip-effect="dark"
        @selection-change="selectSample" @row-click="rowClick">
        <el-table-column v-if="active == 1" :selectable="selectable" type="selection" width="65"></el-table-column>
      <el-table ref="sampleTable" :data="sampleList"
                class="el-table sampleTable"
                highlight-current-row
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
                max-height="400px"
                tooltip-effect="dark"
                @selection-change="selectSample" @row-click="rowClick">
        <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="65"></el-table-column>
        <el-table-column align="center" label="序号" prop="index" type="index" width="65"></el-table-column>
        <el-table-column align="center" label="样品名称" min-width="100" prop="sample">
          <template slot-scope="scope">
            <el-input v-model="scope.row.sample" :disabled="active > 1 || scope.$index !== 0" size="small"
              @change="(val) => changeValue(val, 'sample')"></el-input>
            <el-input v-model="scope.row.sample" :disabled="active>1 || scope.$index !== 0" size="small" @change="(val)=>changeValue(val, 'sample')"></el-input>
          </template>
        </el-table-column>
        <el-table-column align="center" label="样品编号" min-width="140" prop="sampleCode">
          <template slot-scope="scope">
            <el-input v-model="scope.row.sampleCode" :disabled="active > 1 || scope.$index !== 0" clearable
              placeholder="不填写则系统自动生成" size="small" @change="(val) => changeValue(val, 'sampleCode')"></el-input>
            <el-input v-model="scope.row.sampleCode" :disabled="active>1 || scope.$index !== 0" clearable placeholder="不填写则系统自动生成"
                      size="small"
                      @change="(val)=>changeValue(val, 'sampleCode')"></el-input>
          </template>
        </el-table-column>
        <el-table-column align="center" label="样品型号" min-width="100" prop="model">
          <template slot-scope="scope">
            <el-select v-model="scope.row.model" :disabled="active > 1 || scope.$index !== 0" allow-create
              default-first-option filterable placeholder="样品型号" size="small" style="width: 100%;"
              @change="handleChangeModel">
            <el-select v-model="scope.row.model" :disabled="active>1 || scope.$index !== 0" allow-create default-first-option filterable
                       placeholder="样品型号" size="small" style="width: 100%;" @change="handleChangeModel">
              <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
              </el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column v-if="!(active > 1)" align="center" label="型号参数" prop="modelNum" width="130">
        <el-table-column v-if="!(active>1)" align="center" label="型号参数" prop="modelNum" width="130">
          <template slot-scope="scope">
            <el-input v-model="scope.row.modelNum" :disabled="active > 1 || scope.$index !== 0" clearable
              placeholder="非必填" size="small"
              @input="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
            <el-input v-model="scope.row.modelNum" :disabled="active>1|| scope.$index !== 0" clearable placeholder="非必填"
                      size="small"
                      @input="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
          </template>
        </el-table-column>
        <el-table-column align="center" label="检验标准" min-width="100" prop="standardMethodListId">
          <template slot-scope="scope">
            <el-select v-model="scope.row.standardMethodListId"
              :disabled="scope.row.model == null || active > 1 || scope.$index !== 0" :loading="methodLoad" clearable
              placeholder="检验标准" size="small" style="width: 100%;" @change="(value) => methodChange(value, scope.row)"
              @clear="productList = []" @focus="methodFocus">
            <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1|| scope.$index !== 0"
                       :loading="methodLoad" clearable placeholder="检验标准" size="small"
                       style="width: 100%;" @change="(value)=>methodChange(value, scope.row)" @clear="productList = []" @focus="methodFocus">
              <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
              </el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column v-if="addObj.mating == 1" align="center" label="配套样品名称" prop="joinName" width="140">
        <el-table-column v-if="addObj.mating==1" align="center" label="配套样品名称" prop="joinName" width="140">
          <template slot-scope="scope">
            <el-input v-model="scope.row.joinName" :autosize="{ minRows: 1, maxRows: 1 }" size="small"
              type="textarea"></el-input>
            <el-input v-model="scope.row.joinName" :autosize="{ minRows: 1, maxRows: 1}" size="small"
                      type="textarea"></el-input>
          </template>
        </el-table-column>
        <el-table-column v-if="addObj.mating == 1" align="center" label="配套样品型号" prop="joinModel" width="140">
        <el-table-column v-if="addObj.mating==1" align="center" label="配套样品型号" prop="joinModel" width="140">
          <template slot-scope="scope">
            <el-input v-model="scope.row.joinModel" :autosize="{ minRows: 1, maxRows: 1 }" size="small"
              type="textarea"></el-input>
            <el-input v-model="scope.row.joinModel" :autosize="{ minRows: 1, maxRows: 1}" size="small"
                      type="textarea"></el-input>
          </template>
        </el-table-column>
        <el-table-column v-if="addObj.mating == 1" align="center" label="配套样品数量" prop="joinNum" width="140">
        <el-table-column v-if="addObj.mating==1" align="center" label="配套样品数量" prop="joinNum" width="140">
          <template slot-scope="scope">
            <el-input-number v-model="scope.row.joinNum" :controls="false" :max="100" :min="1" :precision="0"
              size="small" style="width: 80%;"></el-input-number>
                             size="small" style="width: 80%;"></el-input-number>
          </template>
        </el-table-column>
        <el-table-column align="center" label="待检项数量" prop="quantity" width="105">
          <template slot-scope="scope">
            <el-select v-model="scope.row.quantity" disabled clearable size="small">
              <el-option v-for="item in quantityList" :key="item.value" :label="item.label"
                :value="item.value"></el-option>
            <el-select v-model="scope.row.quantity" disabled clearable
                       size="small">
              <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </template>
        </el-table-column>
      </el-table>
      <el-table ref="productTable" v-loading="getProductLoad" :data="productList" :row-class-name="tableRowClassName"
        class="el-table" max-height="400px" style="margin-bottom: 10px;"
        :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border tooltip-effect="dark"
        @select="selectOne" @selection-change="selectProduct" @select-all="handleAll">
        <el-table-column v-if="active == 1" :selectable="selectable" type="selection" width="65"></el-table-column>
      <el-table ref="productTable" v-loading="getProductLoad" :data="productList"
                :row-class-name="tableRowClassName"
                class="el-table"
                max-height="400px"
                style="margin-bottom: 10px;"
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
                tooltip-effect="dark"
                @select="selectOne"
                @selection-change="selectProduct"
                @select-all="handleAll">
        <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="65"></el-table-column>
        <el-table-column label="检验项" min-width="140" prop="inspectionItem" show-overflow-tooltip>
          <template slot="header" slot-scope="scope">
            <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
              <span>检验项</span>
              <el-input v-if="active == 1" v-model="inspectionItem" placeholder="请输入" size="mini"
                @input="searchFilterList" />
              <el-input
                v-if="active==1"
                v-model="inspectionItem"
                placeholder="请输入"
                size="mini"
                @input="searchFilterList"/>
            </div>
          </template>
        </el-table-column>
        <el-table-column label="检验项子项" min-width="140" prop="inspectionItemSubclass" show-overflow-tooltip>
        <el-table-column label="检验项子项" min-width="140" prop="inspectionItemSubclass"
                         show-overflow-tooltip>
          <template slot="header" slot-scope="scope">
            <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
              <span>检验项子项</span>
              <el-input v-if="active == 1" v-model="inspectionItemSubclass" placeholder="请输入" size="mini"
                @input="searchFilterList" />
              <el-input
                v-if="active==1"
                v-model="inspectionItemSubclass"
                placeholder="请输入"
                size="mini"
                @input="searchFilterList"/>
            </div>
          </template>
        </el-table-column>
        <el-table-column label="要求值" min-width="220px" prop="ask">
          <template slot-scope="scope">
            <el-input v-if="active == 1 && isAskOnlyRead" v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3 }"
              clearable placeholder="要求值" size="small" type="textarea"
              @change="e => requestChange(e, scope.row)"></el-input>
            <el-input v-if="active==1&&isAskOnlyRead" v-model="scope.row.ask" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="要求值"
                      size="small" type="textarea"
                      @change="e=>requestChange(e,scope.row)"></el-input>
            <span v-else>
              <template>{{ scope.row.ask }}</template>
              <template >{{ scope.row.ask }}</template>
            </span>
          </template>
        </el-table-column>
        <el-table-column label="要求描述" min-width="220px" prop="tell">
          <template slot-scope="scope">
            <el-input v-if="active == 1 && isAskOnlyRead" v-model="scope.row.tell"
              :autosize="{ minRows: 1, maxRows: 3 }" clearable placeholder="要求描述" size="small" type="textarea"
              @change="e => requestChange(e, scope.row, 'tell')"></el-input>
            <el-input v-if="active==1&&isAskOnlyRead" v-model="scope.row.tell" :autosize="{ minRows: 1, maxRows: 3}" clearable placeholder="要求描述"
                      size="small" type="textarea"
                      @change="e=>requestChange(e,scope.row,'tell')"></el-input>
            <span v-else>
              <template>{{ scope.row.tell }}</template>
            </span>
                <template >{{ scope.row.tell }}</template>
              </span>
          </template>
        </el-table-column>
        <el-table-column label="条件" min-width="140" prop="radius" show-overflow-tooltip></el-table-column>
@@ -288,29 +306,35 @@
          <template slot="header" slot-scope="scope">
            <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
              <span>试验方法</span>
              <el-input v-if="active == 1" v-model="methodS" placeholder="请输入" size="mini" @input="searchFilterList" />
              <el-input
                v-if="active==1"
                v-model="methodS"
                placeholder="请输入"
                size="mini"
                @input="searchFilterList"/>
            </div>
          </template>
        </el-table-column>
        <el-table-column label="计量单位" prop="unit" show-overflow-tooltip width="100"></el-table-column>
        <el-table-column label="单价" prop="price" show-overflow-tooltip width="100"></el-table-column>
        <el-table-column label="区间" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
        <el-table-column :filter-method="filterHandler" :filters="filters" label="子实验室" min-width="130"
          prop="sonLaboratory" show-overflow-tooltip></el-table-column>
        <el-table-column :filter-method="filterHandler" :filters="filters" label="子实验室" min-width="130" prop="sonLaboratory"
                         show-overflow-tooltip></el-table-column>
      </el-table>
    </div>
    <!--特殊值处理框-->
    <el-dialog :before-close="beforeClose" :close-on-click-modal="false" :close-on-press-escape="false"
      :show-close="false" :visible.sync="bsm1DiaAll" min-width="400px" title="检测到特殊项,请作出以下选择">
    <el-dialog :before-close="beforeClose" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
               :visible.sync="bsm1DiaAll"
               min-width="400px"
               title="检测到特殊项,请作出以下选择">
      <div v-for="(item, index) in bsm1DiaList" :key="item.id" class="body" style="max-height: 60vh;">
        <span>{{ item.inspectionItem }}</span>
        <span>{{item.inspectionItem}}</span>
        <el-row v-if="item.bsm1">
          <el-col :span="24" class="search_thing" style="height: initial;margin: 5px 0;">
            <div class="search_label" style="width: 80px;"><span class="required-span">* </span>选项:</div>
            <div class="search_input">
              <el-radio-group v-model="item.bsm1Val" v-removeAriaHidden @input="upBsmAll(item)">
                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai" :label="a"
                  style="margin-bottom: 2px;margin-top: 2px;"></el-radio>
                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai" :label="a" style="margin-bottom: 2px;margin-top: 2px;"></el-radio>
              </el-radio-group>
            </div>
          </el-col>
@@ -318,8 +342,8 @@
            <div class="search_label" style="width: 80px;">要求值:</div>
            <div class="search_input">
              <el-radio-group v-model="item.bsm1Val" v-removeAriaHidden @input="upBsmAll(item)">
                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai" :label="a">{{
                  JSON.parse(item.bsmRow.askCopy)[ai] }}</el-radio>
                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai"
                          :label="a">{{JSON.parse(item.bsmRow.askCopy)[ai]}}</el-radio>
              </el-radio-group>
            </div>
          </el-col>
@@ -332,8 +356,9 @@
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
      :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border :show-close="false"
      :visible.sync="bsm3Dia" title="区间值填写" width="800px">
               :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
               :show-close="false" :visible.sync="bsm3Dia"
               title="区间值填写" width="800px">
      <el-table :data="editTable" height="80vh" style="width: 100%">
        <!-- inspectionItemList -->
        <el-table-column label="检验项" prop="inspectionItemList" width="180">
@@ -346,27 +371,36 @@
        </el-table-column>
        <el-table-column label="识别符值" prop="value">
          <template slot-scope="scope">
            <el-input v-model="scope.row.value" placeholder="请输入" size="small"
              @input="inputValueHandler(scope.row, scope.$index)"></el-input>
            <el-input v-model="scope.row.value" placeholder="请输入" size="small" @input="inputValueHandler(scope.row,scope.$index)"></el-input>
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button @click="bsm3Dia = false">取 æ¶ˆ</el-button>
          <el-button @click="bsm3Dia=false">取 æ¶ˆ</el-button>
          <el-button :loading="saveLoad" type="primary" @click="save0">ç¡® å®š</el-button>
        </el-row>
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
      :visible.sync="dialogVisible" title="提示" width="32%">
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      :visible.sync="dialogVisible"
      title="提示"
      width="32%">
      <span>{{ dialogMessage }}</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false, closeOpenPage()">ç¡® å®š</el-button>
        <el-button type="primary" @click="dialogVisible= false,closeOpenPage()">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
      :visible.sync="dialogVisible2" title="提示" width="32%">
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      :visible.sync="dialogVisible2"
      title="提示"
      width="32%">
      <span>{{ dialogMessage2 }}</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible2 = false">ç¡® å®š</el-button>
@@ -384,8 +418,13 @@
        <el-button :loading="templateLoading" type="primary" @click="addTemplateDia">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
      :visible.sync="noNeedCheckDia" title="免检提示" width="32%">
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      :visible.sync="noNeedCheckDia"
      title="免检提示"
      width="32%">
      <span>确认免检当前检验单?</span>
      <span slot="footer" class="dialog-footer">
        <el-button :loading="noNeedCheckLoad" type="primary" @click="handleNoNeedCheck">ç¡® å®š</el-button>
@@ -423,7 +462,7 @@
      active: 0,
      currentId: 0,
      isReport: '',
      editTable: [], // åŒºé—´ç‰¹æ®Šå€¼å¡«å†™
      editTable:[], // åŒºé—´ç‰¹æ®Šå€¼å¡«å†™
      template: null,
      saveLoad: false, // ä¿å­˜æŒ‰é’®loading
      noNeedCheckLoad: false, // å…æ£€æŒ‰é’®loading
@@ -516,9 +555,9 @@
      addObj1: {},
      model: null,
      standardMethodListId: null,
      inspectionItem: null,
      inspectionItemSubclass: null,
      methodS: null,
      inspectionItem:null,
      inspectionItemSubclass:null,
      methodS:null,
      codeLevel: '', // æ ·å“æ‰€åœ¨çº§åˆ«
      selectTreeTem: '', // æ ·å“çˆ¶çº§
      checkType: [], // æ£€éªŒç±»åž‹é€‰é¡¹æ•°æ®
@@ -531,14 +570,14 @@
      templateName: '', // ä¿å­˜æ¨¡ç‰ˆåç§°
      templates: [], // æ¨¡ç‰ˆä¸‹æ‹‰æ¡†æ•°æ®
      quantityList: [
        { label: 1, value: 1 },
        { label: 2, value: 2 },
        { label: 3, value: 3 },
        { label: 4, value: 4 },
        { label: 5, value: 5 },
        { label: 6, value: 6 },
        { label: 7, value: 7 },
        { label: 8, value: 8 },
        { label: 1, value: 1},
        { label: 2, value: 2},
        { label: 3, value: 3},
        { label: 4, value: 4},
        { label: 5, value: 5},
        { label: 6, value: 6},
        { label: 7, value: 7},
        { label: 8, value: 8},
      ],
      types: [], // ç´§æ€¥ç¨‹åº¦ä¸‹æ‹‰æ¡†
      dataTitle: [
@@ -553,7 +592,7 @@
      ],
      dataIndex: 0,
      isShowTab: false,
      symbolList: ['RTS'],
      symbolList:['RTS'],
      bsm3Dia: false, // åŒºé—´å€¼å¡«å†™å¼¹æ¡†
      bsmRow: {},
      bsm1: false,
@@ -619,7 +658,7 @@
    this.getInfo() // èŽ·å–æ•°æ®
  },
  methods: {
    save1() {
    save1 () {
      if (this.bsm1DiaList.length > 0) {
        this.bsm1DiaList.forEach(item => {
          if (!item.bsm1Val) {
@@ -640,24 +679,24 @@
      done()
    },
    //特殊值填写处理
    inputValueHandler(row, index) {
      if (row) {
        const nextIndex = index + 1
    inputValueHandler(row,index){
      if(row){
        const nextIndex = index+1
        for (let i = nextIndex; i < this.editTable.length; i++) {
          const element = this.editTable[i];
          if (element.model == row.model && row.symbolItem == element.symbolItem) {
          if(element.model==row.model&&row.symbolItem==element.symbolItem){
            this.editTable[i].value = row.value
          }
        }
      }
    },
    // æŸ¥çœ‹æ—¶åˆ‡æ¢tab栏
    handleDataTab(m, i) {
    handleDataTab (m, i) {
      this.dataIndex = i
      this.getInfo()
    },
    // èŽ·å–æ•°æ®
    getInfo() {
    getInfo () {
      if (this.active == 2) {
        let orderId = ''
        if (!this.customsInspection.enterOrderId && this.customsInspection.quarterOrderId) {
@@ -705,7 +744,7 @@
          }
        })
      } else {
        notificationRawOrder({ ifsInventoryId: this.customsInspection.id }).then(res => {
        notificationRawOrder({ifsInventoryId:this.customsInspection.id}).then(res => {
          if (res.code === 200) {
            if (res.data === 1) {
              if (this.orderType != 1) {
@@ -719,7 +758,7 @@
          }
        })
        // æŠ¥æ£€æµç¨‹
        selectStandardTreeListByPartNo({ partNo: this.customsInspection.partNo }).then(res => {
        selectStandardTreeListByPartNo({partNo:this.customsInspection.partNo}).then(res => {
          if (res.data !== null) {
            this.addObj.sample = res.data.label
            this.codeLevel = res.data.code
@@ -751,7 +790,7 @@
    },
    // æŸ¥è¯¢æ¨¡æ¿-反显模板
    selectInsOrderTemplateByIdList(e) {
      selectRawMaterOrderTemplateById({ id: e }).then(res => {
      selectRawMaterOrderTemplateById({id: e}).then(res => {
        let obj = JSON.parse(res.data)
        this.sampleList = obj.sampleList;
        this.productList = obj.sampleList[0].insProduct
@@ -773,7 +812,7 @@
          thing: JSON.stringify({
            // addObj: this.addObj,
            sampleList: sampleList,
            selectTree: this.selectTree
            selectTree:this.selectTree
          })
        }).then(res => {
          this.templateLoading = false;
@@ -793,22 +832,22 @@
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        delRawMaterOrderTemplate({ id: row.id }).then(res => {
        delRawMaterOrderTemplate({id: row.id}).then(res => {
          this.$message.success('删除成功')
          this.selectInsOrderTemplate()
        }).catch(e => {
          this.$message.error('删除失败')
        })
      }).catch(() => { })
      }).catch(() => {})
    },
    // æŸ¥è¯¢æ¨¡æ¿åˆ—表
    selectInsOrderTemplate() {
      selectRawMaterOrderTemplate({ partNo: this.addObj.partNo }).then(res => {
      selectRawMaterOrderTemplate({partNo:this.addObj.partNo}).then(res => {
        this.templates = res.data
      })
    },
    // æ‹†åˆ†
    handleSplitCountNum() {
    handleSplitCountNum () {
      this.sample.joinName = null
      this.sample.joinModel = null
      this.sample.joinNum = 1
@@ -831,7 +870,7 @@
      this.computationalPairing(this.sampleList.length)
    },
    // æ£€éªŒé¡¹åˆ—表筛选
    searchFilterList() {
    searchFilterList () {
      const vtw = {
        inspectionItem: this.inspectionItem, // æ£€éªŒé¡¹
        inspectionItemSubclass: this.inspectionItemSubclass, // æ£€éªŒé¡¹å­é¡¹
@@ -842,7 +881,7 @@
      })
      this.changeProductList0()
      if (isHaveValue) {
        for (let i in vtw) {
        for(let i in vtw) {
          if (vtw[i]) {
            this.productList = this.productList0.filter((item) => {
              return item[i] && item[i].includes(vtw[i])
@@ -855,11 +894,11 @@
      }
    },
    containsValue(str) {
      if (str) {
      if(str){
        let symbolItem = ''
        this.symbolList.some(value => {
          if (str.includes(value)) {
            symbolItem = value
        this.symbolList.some(value =>{
          if(str.includes(value)){
            symbolItem  = value
            return true
          }
        })
@@ -880,18 +919,18 @@
          })
          this.getTotal(sampleList)
          let projectNum = this.totalArr.filter(a => a.state == 1).length
          if (projectNum == 0) {
          if(projectNum==0){
            this.$confirm('检验项目为空,是否确认提交?', "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning"
            }).then(() => {
              this.saveMethod(sampleList)
            }).catch(() => { })
          } else {
            let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b => a.ask.includes(b)) && a.state == 1)
            }).catch(() => {})
          }else{
            let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask.includes(b)) && a.state == 1)
            if (isRTS) {
              this.editTable = this.handleData(sampleList, this.containsValue, 0)
              this.editTable = this.handleData(sampleList,this.containsValue, 0)
              this.editTable.forEach(item => {
                item.value = item.modelNum
              })
@@ -907,21 +946,21 @@
      });
    },
    // æäº¤åŒºé—´å€¼
    save0() {
      if (this.editTable.every(m => m.value)) {
    save0(){
      if(this.editTable.every(m=>m.value)){
        this.sampleList.forEach(item => {
          item.insProduct = this.productList
        })
        let sampleList = this.handleData(this.HaveJson(this.sampleList), this.handleAsk, 1)
        let sampleList = this.handleData(this.HaveJson(this.sampleList),this.handleAsk,1)
        sampleList.forEach(a => {
          a.insProduct = a.insProduct.filter(b => b.state === 1)
          a.insProduct = a.insProduct.filter(b=>b.state === 1)
        })
        this.saveMethod(sampleList)
      } else {
      }else{
        this.$message.error('请填写识别符值')
      }
    },
    noNeedCheck() {
    noNeedCheck () {
      this.$refs['addObj'].validate((valid) => {
        if (valid) {
          if (!this.sampleList.every(m => m.standardMethodListId)) {
@@ -935,7 +974,7 @@
          })
          this.getTotal(sampleList)
          let projectNum = this.totalArr.filter(a => a.state == 1).length
          if (projectNum != 0) {
          if (projectNum!=0){
            this.$message.error('免检不可选择检验项')
            return
          }
@@ -946,7 +985,7 @@
        }
      });
    },
    handleNoNeedCheck() {
    handleNoNeedCheck () {
      // æ£€éªŒç±»åž‹ä¸ºè¿›åŽ‚æ£€éªŒæ—¶å¯é€‰æ‹©å…æ£€ï¼Œä½†ä¸èƒ½é€‰æ‹©æ£€éªŒé¡¹
      const sampleList = this.HaveJson(this.sampleList)
      sampleList.forEach(item => {
@@ -986,7 +1025,7 @@
          } else {
            a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
          }
          a.insProduct = a.insProduct.filter(b => b.state === 1)
          a.insProduct = a.insProduct.filter(b=>b.state === 1)
          return a
        }),
      }).then(res => {
@@ -994,11 +1033,11 @@
        this.noNeedCheckDia = false
        this.$message.success('已提交')
        this.closeOpenPage()
      }).catch(e => {
      }).catch(e=>{
        this.noNeedCheckLoad = false
      })
    },
    saveMethod(sampleList) {
    saveMethod(sampleList){
      let trees = this.selectTree.split(" - ")
      if (trees.length < 3) {
        this.$message.error('未选择对象')
@@ -1040,7 +1079,7 @@
          } else {
            a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
          }
          a.insProduct = a.insProduct.filter(b => b.state === 1)
          a.insProduct = a.insProduct.filter(b=>b.state === 1)
          return a
        }),
      }).then(res => {
@@ -1048,12 +1087,12 @@
        this.$message.success('已提交')
        this.bsm3Dia = false;
        this.closeOpenPage()
      }).catch(e => {
      }).catch(e=>{
        this.saveLoad = false
      })
    },
    handleAsk(ask, symbolItem, value) {
      try {
    handleAsk(ask,symbolItem, value) {
      try{
        let code = [">", "<", "=", ">", "<", "≥", "≤", "±", "*", "/"];
        let code2 = ['+', '*', '/', '-']
        if (ask.includes('&')) {
@@ -1097,42 +1136,42 @@
            return code[index] + '' + num
          }
        }
      } catch (e) { }
      }catch(e){}
    },
    handleData(sampleList, calBack, type) {
    handleData(sampleList,calBack,type){
      let editTable = []
      sampleList.forEach(item => {
        let obj = {
          sampleCode: item.sampleCode,
          model: item.model,
          symbolList: [],
          sampleId: item.id,
          modelNum: item.modelNum,
          sampleCode:item.sampleCode,
          model:item.model,
          symbolList:[],
          sampleId:item.id,
          modelNum:item.modelNum,
        }
        if (item.insProduct && item.insProduct.length > 0) {
          item.insProduct.forEach(a => {
            if (a.state == 1) {
              if (type == 0) {
              if(type==0){
                let str = calBack(a.ask)
                str && obj.symbolList.push({
                  symbolItem: str,
                  inspectionItem: a.inspectionItem,
                str&&obj.symbolList.push({
                  symbolItem:str,
                  inspectionItem:a.inspectionItem,
                })
              } else if (type == 1) {
              }else if(type==1){
                let arr = this.editTable.filter(b => b.sampleId == item.id)
                for (var i = 0; i < arr.length; i++) {
                  if (a.ask) {
                    if (a.ask.includes(arr[i].symbolItem)) {
                      let ask = calBack(a.ask, arr[i].symbolItem, arr[i].value)
                for (var i=0;i<arr.length;i++){
                  if(a.ask){
                    if(a.ask.includes(arr[i].symbolItem)){
                      let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value)
                      if (ask) {
                        a.ask = ask
                      }
                      let tell = this.handleAsk(a.tell, arr[i].symbolItem, arr[i].value)
                      let tell = this.handleAsk(a.tell, arr[i].symbolItem,arr[i].value)
                      if (tell) {
                        a.tell = tell
                      }
                    }
                  } else {
                  }else{
                    this.$message.error('要求值为空,需要去标准库维护!')
                  }
                }
@@ -1148,21 +1187,21 @@
                if (b.productList && b.productList.length > 0) {
                  b.productList.forEach(c => {
                    if (c.state == 1) {
                      if (type == 0) {
                      if(type==0){
                        let str = calBack(c.ask)
                        str && obj.symbolList.push({
                          symbolItem: str,
                          inspectionItem: c.inspectionItem,
                        str&&obj.symbolList.push({
                          symbolItem:str,
                          inspectionItem:c.inspectionItem,
                        })
                      } else if (type == 1) {
                      }else if(type==1){
                        let arr = this.editTable.filter(b => b.sampleId == item.id)
                        arr.forEach(f => {
                          if (c.ask.includes(f.symbolItem)) {
                            let ask = calBack(c.ask, f.symbolItem, f.value)
                          if(c.ask.includes(f.symbolItem)){
                            let ask = calBack(c.ask, f.symbolItem,f.value)
                            if (ask) {
                              c.ask = ask
                            }
                            let tell = this.handleTell(c.tell, f.symbolItem, f.value)
                            let tell = this.handleTell(c.tell, f.symbolItem,f.value)
                            if (tell) {
                              c.tell = tell
                            }
@@ -1179,25 +1218,25 @@
                if (b.productList && b.productList.length > 0) {
                  b.productList.forEach(c => {
                    if (c.state == 1) {
                      if (type == 0) {
                      if(type==0){
                        let str = calBack(c.ask)
                        str && obj.symbolList.push({
                          symbolItem: str,
                          inspectionItem: c.inspectionItem,
                        str&&obj.symbolList.push({
                          symbolItem:str,
                          inspectionItem:c.inspectionItem,
                        })
                      } else if (type == 1) {
                      }else if(type==1){
                        // let ask = calBack(c.ask, c.rts)
                        // if (ask && c.state == 1) {
                        //   c.ask = csk
                        // }
                        let arr = this.editTable.filter(b => b.sampleId == item.id)
                        arr.forEach(f => {
                          if (c.ask.includes(f.symbolItem)) {
                            let ask = calBack(c.ask, f.symbolItem, f.value)
                          if(c.ask.includes(f.symbolItem)){
                            let ask = calBack(c.ask, f.symbolItem,f.value)
                            if (ask) {
                              c.ask = ask
                            }
                            let tell = this.handleTell(c.tell, f.symbolItem, f.value)
                            let tell = this.handleTell(c.tell, f.symbolItem,f.value)
                            if (tell) {
                              c.tell = tell
                            }
@@ -1212,25 +1251,25 @@
                    if (c.productList && c.productList.length > 0) {
                      c.productList.forEach(d => {
                        if (d.state == 1) {
                          if (type == 0) {
                          if(type==0){
                            let str = calBack(d.ask)
                            str && obj.symbolList.push({
                              symbolItem: str,
                              inspectionItem: d.inspectionItem,
                            str&&obj.symbolList.push({
                              symbolItem:str,
                              inspectionItem:d.inspectionItem,
                            })
                          } else if (type == 1) {
                          }else if(type==1){
                            // let ask = calBack(d.ask, d.rts)
                            // if (ask && d.state == 1) {
                            //   d.ask = ask
                            // }
                            let arr = this.editTable.filter(b => b.sampleId == item.id)
                            arr.forEach(f => {
                              if (d.ask.includes(f.symbolItem)) {
                                let ask = calBack(d.ask, f.symbolItem, f.value)
                              if(d.ask.includes(f.symbolItem)){
                                let ask = calBack(d.ask, f.symbolItem,f.value)
                                if (ask) {
                                  d.ask = ask
                                }
                                let tell = this.handleTell(d.tell, f.symbolItem, f.value)
                                let tell = this.handleTell(d.tell, f.symbolItem,f.value)
                                if (tell) {
                                  d.tell = tell
                                }
@@ -1246,11 +1285,11 @@
            }
          })
        }
        if (type == 0) {
        if(type==0){
          editTable.push(obj)
        }
      })
      if (type == 0) {
      if(type==0){
        editTable.forEach(a => {
          a.symbolList.forEach(b => {
            let arr = a.symbolList.filter(c => c.symbolItem == b.symbolItem);
@@ -1259,13 +1298,13 @@
        })
        editTable.forEach(a => {
          let mySet = new Set();
          a.symbolList = a.symbolList.filter(b => {
          a.symbolList = a.symbolList.filter(b =>{
            let num0 = mySet.size;
            mySet.add(b.symbolItem);
            let num1 = mySet.size;
            if (num0 != num1) {
            if(num0!=num1){
              return true;
            } else {
            }else{
              return false
            }
          })
@@ -1274,19 +1313,19 @@
        editTable.forEach(a => {
          a.symbolList.forEach(b => {
            let obj = {
              sampleCode: a.sampleCode,
              model: a.model,
              symbolItem: b.symbolItem,
              sampleId: a.sampleId,
              value: null,
              inspectionItemList: b.inspectionItemList,
              modelNum: a.modelNum,
              sampleCode:a.sampleCode,
              model:a.model,
              symbolItem:b.symbolItem,
              sampleId:a.sampleId,
              value:null,
              inspectionItemList:b.inspectionItemList,
              modelNum:a.modelNum,
            }
            editTableNew.push(obj)
          })
        })
        return editTableNew
      } else {
      }else{
        return sampleList
      }
    },
@@ -1296,7 +1335,7 @@
      } catch (e) {
      }
    },
    replaceAll(str, find, value) {
    replaceAll(str,find,value) {
      if (str === undefined) {
        return str
      }
@@ -1374,10 +1413,10 @@
        let num1 = mySet0.size
        mySet0.add(item.sonLaboratory)
        let num2 = mySet0.size
        if (num2 > num1) {
        if(num2>num1){
          this.sonLaboratoryList.push({
            label: item.sonLaboratory,
            value: item.sonLaboratory,
            label:item.sonLaboratory,
            value:item.sonLaboratory,
          })
        }
      })
@@ -1425,11 +1464,11 @@
          } else {
            this.methods = res.data.standardMethodList
          }
        } catch (e) { }
        } catch (e) {}
      })
    },
    // èµ‹å€¼ç¬¬ä¸€æ¡é»˜è®¤æ•°æ®
    addListInfo(codeLevel, data) {
    addListInfo (codeLevel, data) {
      this.sampleList = []
      this.productList = []
      this.sample.model = this.addObj.model
@@ -1522,14 +1561,14 @@
      }
      this.bsm2Val3 = this.HaveJson(this.permute(nums))
    },
    tableRowClassName({ row, rowIndex }) {
    tableRowClassName({row, rowIndex}) {
      if (row.state === 0) {
        return '';
      }
      return 'warning-row';
    },
    // ä¿®æ”¹æ ·å“åç§°
    changeValue(val, string) {
    changeValue (val, string) {
      if (this.sampleList.length > 1) {
        // æœ‰ä¸¤æ¡æ ·å“æ—¶ï¼Œç¬¬äºŒæ¡æ ·å“ä¿¡æ¯å’Œç¬¬ä¸€æ¡ä¿æŒä¸€è‡´
        this.sampleList.forEach(item => {
@@ -1556,9 +1595,9 @@
      }
      this.getProductLoad = true
      let selectTreeList = this.selectTree.split(" - ")
      this.addObj.model && (selectTreeList[selectTreeList.length - 1] = this.addObj.model)
      this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model)
      selectStandardProductList({
        model: this.addObj.model ? this.addObj.model : row.model,
        model: this.addObj.model?this.addObj.model:row.model,
        modelNum: row.modelNum,
        standardMethodListId: val,
        factory: selectTreeList.join(" - "),
@@ -1578,7 +1617,7 @@
          })
        }, 200)
      }).catch(err => {
        console.log('err-', err)
        console.log('err-',err)
      })
    },
    // é€‰æ‹©æ ·å“åž‹å·çš„回调
@@ -1639,7 +1678,7 @@
      }
    },
    // å…¨é€‰ç‰¹æ®Šå€¼å¤„理框选择要求值的回调
    upBsmAll(item) {
    upBsmAll (item) {
      const i = this.bsm1DiaList.findIndex(obj => obj.id === item.id)
      if (i > -1) {
        // æ‰¾åˆ°ç›¸åº”的检验项赋值
@@ -1670,7 +1709,7 @@
    selectOne(selection, row) {
      this.bsm1DiaList = []
      row.state = row.state == 1 ? 0 : 1
      if (row.section === null) {
      if(row.section === null) {
        row.section = ""
      }
      if (row.sectionCopy === undefined && row.section) {
@@ -1684,18 +1723,18 @@
      if (row.tell.includes('[')) {
        this.$set(row, 'tellCopy', row.tell)
      }
      let arr = this.productList.filter(m => m.state == 1 && row.sectionCopy && row.sectionCopy.includes(m.sectionCopy) && m.ask && m.sectionCopy.indexOf('[') == -1)
      if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.sectionCopy !== undefined && row.state === 1 && arr.length == 0) {
      let arr = this.productList.filter(m=>m.state==1&&row.sectionCopy&&row.sectionCopy.includes(m.sectionCopy)&&m.ask&&m.sectionCopy.indexOf('[')==-1)
      if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.sectionCopy !== undefined && row.state === 1&&arr.length==0) {
        if (row.sectionCopy.indexOf('[') > -1) {
          row.bsmRow = this.HaveJson(row)
        }
        row.bsm1 = true
        this.bsm1DiaList.push(row)
        this.bsm1DiaAll = true
      } else if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.state === 0 && arr.length == 0) {
      } else if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.state === 0&&arr.length==0) {
        row.bsm1 = false
      } else if (arr.length > 0) {
        try {
      }else if(arr.length>0){
        try{
          row.bsmRow = this.HaveJson(row)
          let section = arr[0].section
          let arr0 = JSON.parse(row.section)
@@ -1705,7 +1744,7 @@
          row.section = section
          row.ask = arr1[index]
          row.tell = arr4[index]
        } catch (e) { }
        } catch(e) {}
      }
      this.sampleList.map(item => {
        if (this.sampleIds.indexOf(item.id) > -1) {
@@ -1725,7 +1764,7 @@
    handleAll(e) {
      if (e.length > 0) {
        this.productList.map(m => {
          if (e.find(a => a.id == m.id)) {
          if(e.find(a=>a.id == m.id)){
            m.state = 1
          }
          return m
@@ -1789,10 +1828,10 @@
        this.$refs.productTable.doLayout()
      })
    },
    changeProductList0() {
      this.productList0.forEach(a => {
    changeProductList0(){
      this.productList0.forEach(a=>{
        let obj = this.productList.find(m => m.id == a.id)
        if (obj) {
        if(obj){
          a.state = obj.state
          a.section = obj.section
          a.ask = obj.ask
@@ -1800,7 +1839,7 @@
          // a.price = obj.price
          a.tell = obj.tell
        }
        if (a.state == 0 && a.bsmRow) {
        if(a.state == 0&&a.bsmRow){
          a = this.HaveJson(a.bsmRow)
        }
      })
@@ -1809,7 +1848,7 @@
      const property = column['property'];
      return row[property] === value;
    },
    goBack() {
    goBack () {
      if (this.active == 1) {
        this.$router.go(-1)
      } else {
@@ -1830,7 +1869,6 @@
  justify-content: space-between;
  margin-bottom: 10px;
}
.tab {
  list-style-type: none;
  display: flex;
@@ -1859,4 +1897,7 @@
  background-color: #ffffff;
}
>>>.warning-row {
  color: #1890FF;
}
</style>
src/views/business/materialOrder/index.vue
@@ -275,7 +275,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableData1: [],
@@ -356,7 +356,7 @@
      ],
      page1: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableData2: [],
@@ -412,7 +412,25 @@
        { label: '零件描述', prop: 'partDesc' },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        { label: '免检', prop: 'isExemption' },
        {
          dataType: 'tag',
          label: '免检',
          prop: 'isExemption',
          formatData: (params) => {
            if (params == 1) {
              return '免检'
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else {
              return null
            }
          }
        },
        {
          label: '样品名称',
          prop: 'sampleName',
@@ -515,7 +533,7 @@
      ],
      page2: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableData3: [],
@@ -565,7 +583,25 @@
        { label: '零件描述', prop: 'partDesc' },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        { label: '免检', prop: 'isExemption' },
        {
          dataType: 'tag',
          label: '免检',
          prop: 'isExemption',
          formatData: (params) => {
            if (params == 1) {
              return '免检'
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else {
              return null
            }
          }
        },
        {
          label: '样品名称',
          prop: 'sampleName',
@@ -621,7 +657,7 @@
      ],
      page3: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableData4: [],
@@ -671,7 +707,25 @@
        { label: '零件描述', prop: 'partDesc' },
        { label: '供应商名称', prop: 'supplierName' },
        { label: '不合格描述', prop: 'unqualifiedDesc' },
        { label: '免检', prop: 'isExemption' },
        {
          dataType: 'tag',
          label: '免检',
          prop: 'isExemption',
          formatData: (params) => {
            if (params == 1) {
              return '免检'
            } else {
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'success'
            } else {
              return null
            }
          }
        },
        {
          label: '样品名称',
          prop: 'sampleName',
@@ -744,7 +798,7 @@
      ],
      page4: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      entity: {
src/views/business/productOrder/components/add.vue
@@ -598,7 +598,7 @@
} from "@/api/business/rawMaterialOrder";
import {
  addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
  getQuarterOnOrder,
  getQuarterOnOrder, selectInsOrderTemplateById,
  selectOrderManDay,
  updateInsOrder,
  upInsOrder,
@@ -608,6 +608,7 @@
import {selectsStandardMethodByFLSSM} from "@/api/standard/standardLibrary";
import limsTable from "@/components/Table/lims-table.vue";
import {selectCustomPageList} from "@/api/system/customer";
import {mapGetters} from "vuex";
export default {
  name: 'Add',
@@ -615,6 +616,9 @@
    limsTable,
    cableConfig,
    AuxiliaryWireCore
  },
  computed:{
  ...mapGetters(["nickName"]),
  },
  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
  data() {
@@ -981,7 +985,7 @@
      },
      // èŽ·å–ç”¨æˆ·åˆ—è¡¨
      getAuthorizedPerson() {
        selectUserCondition().then(res => {
        selectUserCondition({ type: 1 }).then(res => {
          let data = []
          res.data.forEach(a => {
            data.push({
@@ -1126,7 +1130,9 @@
            sampleList.forEach(a => {
              if (a.insProduct.length > 0) {
                a.insProduct.forEach(c => {
                  delete c.id
                  if (this.tabIndex != 4) {
                    delete c.id
                  }
                })
              }
              if (a.endModels) {
@@ -1164,7 +1170,9 @@
          sampleList.forEach(a => {
            if (a.insProduct.length > 0) {
              a.insProduct.forEach(c => {
                delete c.id
                if (this.tabIndex != 4) {
                  delete c.id
                }
              })
            }
            if (a.endModels) {
@@ -1263,14 +1271,16 @@
        }
      },
      saveMethod(sampleList){
        console.log('sampleList----', sampleList)
        this.saveLoad = true
        if (this.addObj.quarterItemId) {
          this.addObj.quarterItemId = this.addObj.quarterItemId[1]
        }
        if(this.tabIndex==4&&this.active==2){
          if (this.addObj.createTime) {
            delete this.addObj.createTime
          }
          // é€€å›žåŽæäº¤
          updateInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => {
          updateInsOrder({insOrder: this.addObj, sampleProduct: sampleList}).then(res => {
            this.saveLoad = false
            this.$message.success('已提交')
            this.bsm3Dia = false;
@@ -1404,7 +1414,6 @@
        if (node.data.code === '[3]') {
          this.sampleViewEn = val.sampleTypeEn
        } else if (node.data.code === '[4]') {
          console.log('node.data---', node.data)
          if (node.data.children!==null && node.data.children.length>0) {
            this.sampleViewEn = val.sampleEn
          }
@@ -1648,14 +1657,12 @@
        backtrack([], nums);
        return result;
      },
      tableRowClassName({
        row,
        rowIndex
      }) {
        if (row.state === 0) {
      tableRowClassName({row, rowIndex}) {
        if (row.state == 1) {
          return 'warning-row';
        } else {
          return '';
        }
        return 'warning-row';
      },
      selectInsOrderTemplate() {
        selectInsOrderTemplate({company: this.addObj.company}).then(res => {
@@ -1708,12 +1715,13 @@
        selectInsOrderTemplateById({id: e}).then(res => {
          let obj = JSON.parse(res.data)
          //制单人设置为当前登录用户
          let user = JSON.parse(localStorage.getItem('user'))
          let user = this.nickName
          obj.addObj.custom = user.name
          obj.addObj.userId = user.userId
          this.addObj = obj.addObj;
          this.sampleList = obj.sampleList;
          this.selectTree = obj.selectTree
          this.rowClick(this.sampleList[0])
        })
      },
      delSampleAndProduct() {
@@ -2214,7 +2222,11 @@
</script>
<style scoped>
.el-table .warning-row .cell {
  color: #3A7BFA;
>>>.warning-row {
  color: #1890FF;
}
.node_i {
  color: orange;
  font-size: 18px;
}
</style>
src/views/business/productOrder/components/auxiliaryWireCore.vue
@@ -250,10 +250,7 @@
        this.$refs.productTable.doLayout()
      })
    },
    tableRowClassName({
                        row,
                        rowIndex
                      }) {
    tableRowClassName({row, rowIndex}) {
      if (row.state === 0) {
        return '';
      }
@@ -397,7 +394,7 @@
  font-size: 12px;
}
.ins_order_config .el-table .warning-row .cell {
  color: #3A7BFA;
>>>.warning-row {
  color: #1890FF;
}
</style>
src/views/business/productOrder/components/cable-config.vue
@@ -384,7 +384,7 @@
  display: flex;
  justify-content: space-between;
}
.el-table .warning-row .cell {
  color: #3A7BFA;
>>>.warning-row {
  color: #1890FF;
}
</style>
src/views/business/productOrder/components/printDialog.vue
@@ -163,7 +163,6 @@
        }).then(res => {
          if (res.code === 200 && res.data.length > 0) {
            res.data.forEach(item => {
              console.log('item---', item)
              item.sendTime = item.sendTime && item.sendTime.substring(0, 10)
              item.sampleNumber = item.qtyArrived + item.buyUnitMeas
              this.$set(item, 'barcode', item.entrustCode)
src/views/business/productOrder/index.vue
@@ -529,7 +529,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      state: 0,// 0:台账页,1:检验页面,2检验页面(复核),默认为0,3数据查看
@@ -558,7 +558,7 @@
      tableDataLook: [],
      tableDataLookPage: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableDataLookColumn: [
@@ -649,7 +649,7 @@
      ],
      pageFile: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      formData: {},
@@ -686,7 +686,7 @@
      ],
      pageDelete: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      deleteDialogVisible: false,
@@ -946,7 +946,8 @@
        path: "/productOrder/add", query: {
          examine: 1,
          active: 2,
          currentId: row.id
          currentId: row.id,
          tabIndex: this.tabIndex,
        }
      });
    },
@@ -976,7 +977,7 @@
    closeDia () {
      this.tableDataLookPage = {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      }
      this.dataDialogVisible = false
@@ -1039,7 +1040,7 @@
    },
    getDeleteList() {
      this.tableLoadingDelete = true
      selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds }).then(res => {
      selectNoProducts({ orderId: this.orderId, revocationInsProductIds: this.revocationInsProductIds, ...this.pageDelete }).then(res => {
        this.tableLoadingDelete = false
        this.componentDataDelete = res.data.records
        this.pageDelete.total = res.data.total
src/views/business/productSamplingInfo/components/addQuarterItem.vue
@@ -273,7 +273,7 @@
      }
    },
    getUserList(){
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition().then((res) => {
        this.userList = res.data;
      })
    },
src/views/business/productSamplingInfo/index.vue
@@ -316,7 +316,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableData1: [],
@@ -362,7 +362,7 @@
      ],
      page1: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      yearSampleDia: false, // å¹´åº¦æŠ½æ ·
@@ -610,7 +610,7 @@
      return 'height: calc(100% - ' + '44' + 'px)'
    },
    getUserList() {
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition().then((res) => {
        this.userList = res.data;
      })
    },
src/views/business/reportPreparation/index.vue
@@ -184,8 +184,8 @@
          <el-button size="small" style="height: 38px" type="primary">附件上传</el-button>
        </el-upload>
      </div>
      <lims-table :tableData="tableDataFile" :column="columnFile" height="500px" key="tableDataFile"
        :tableLoading="tableLoadingFile"></lims-table>
      <lims-table :tableData="tableDataFile" :column="columnFile" height="500px"
        key="tableDataFile" :tableLoading="tableLoadingFile"></lims-table>
    </el-dialog>
  </div>
</template>
@@ -205,7 +205,7 @@
import { mapGetters } from "vuex";
import { selectUserCondition } from "@/api/business/inspectionTask";
import limsTable from "@/components/Table/lims-table.vue";
import { delFile, downFile, getFileList } from "@/api/business/rawMaterialOrder";
import {delFile, downFile, getFileList} from "@/api/business/rawMaterialOrder";
export default {
  name: 'ReportPreparation',
  components: { limsTable, onlyoffice },
@@ -815,7 +815,7 @@
    },
    // èŽ·å–äººå‘˜åˆ—è¡¨
    getAuthorizedPerson() {
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition({ type: 1 }).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
src/views/business/unpass/components/PurchaseVerification.vue
@@ -246,7 +246,6 @@
  // æ–¹æ³•集合
  methods: {
    async getInsOrder(operationType, item) {
      console.log('operationType----', operationType)
      this.operationType = operationType
      this.info = item
      // æŸ¥è¯¢å·²æäº¤çš„æ•°æ®
src/views/business/unpass/index.vue
@@ -95,7 +95,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
    }
src/views/performance/manHour/workTimeConfig.vue
@@ -277,8 +277,7 @@
      })
        .then(() => {
          deleteAuxiliaryWorkingHours({ id: row.id }).then((res) => {
            console.log('res', res)
            if (res.code == 200) {
            if (res.code == 200){
              this.$message.success("删除成功");
              this.refresh();
            }
src/views/thirdpartylogin.vue
@@ -5,25 +5,18 @@
export default {
  data() {
    return {
      SSO: window.location.hash
    }
    };
  },
  created() {
    this.initLogin()
    console.log(this.SSO)
    this.initLogin();
  },
  methods: {
    initLogin() {
      const code = this.SSO.split('&')[0].split('=')[1]
      console.log(code)
      if (code) {
        this.$store.dispatch('LoginBySSO', code).then(() => {
          this.$router.push({ path: '/' })
        })
      }
      this.$store.dispatch('LoginBySSO', {code: this.$route.query.code}).then(() => {
        this.$router.push({path: '/'});
      });
    }
  }
}
};
</script>
<style scoped></style>
<style scoped></style>
src/workers/DataWorker.worker.js
src/workers/InspectionWorker.worker.js
ÎļþÃû´Ó src/InspectionWorker.worker.js ÐÞ¸Ä
@@ -1,4 +1,6 @@
// å¤šçº¿ç¨‹é‡Œé¢éœ€è¦ä¿å­˜çš„æ•°æ®
import Big from "big.js";
let code = "";
// è¡¨æ ¼æ•°æ®ï¼ˆæ¸²æŸ“)
let tableList = null;
@@ -1439,913 +1441,3 @@
    console.log("error", error);
  }
}
/*
 *  big.js v5.2.2
 *  A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic.
 *  Copyright (c) 2018 Michael Mclaughlin <M8ch88l@gmail.com>
 *  https://github.com/MikeMcl/big.js/LICENCE
 */
(function (GLOBAL) {
  "use strict";
  var Big,
    /************************************** EDITABLE DEFAULTS *****************************************/
    // The default values below must be integers within the stated ranges.
    /*
     * The maximum number of decimal places (DP) of the results of operations involving division:
     * div and sqrt, and pow with negative exponents.
     */
    DP = 20, // 0 to MAX_DP
    /*
     * The rounding mode (RM) used when rounding to the above decimal places.
     *
     *  0  Towards zero (i.e. truncate, no rounding).       (ROUND_DOWN)
     *  1  To nearest neighbour. If equidistant, round up.  (ROUND_HALF_UP)
     *  2  To nearest neighbour. If equidistant, to even.   (ROUND_HALF_EVEN)
     *  3  Away from zero.                                  (ROUND_UP)
     */
    RM = 1, // 0, 1, 2 or 3
    // The maximum value of DP and Big.DP.
    MAX_DP = 1e6, // 0 to 1000000
    // The maximum magnitude of the exponent argument to the pow method.
    MAX_POWER = 1e6, // 1 to 1000000
    /*
     * The negative exponent (NE) at and beneath which toString returns exponential notation.
     * (JavaScript numbers: -7)
     * -1000000 is the minimum recommended exponent value of a Big.
     */
    NE = -7, // 0 to -1000000
    /*
     * The positive exponent (PE) at and above which toString returns exponential notation.
     * (JavaScript numbers: 21)
     * 1000000 is the maximum recommended exponent value of a Big.
     * (This limit is not enforced or checked.)
     */
    PE = 21, // 0 to 1000000
    /**************************************************************************************************/
    // Error messages.
    NAME = "[big.js] ",
    INVALID = NAME + "Invalid ",
    INVALID_DP = INVALID + "decimal places",
    INVALID_RM = INVALID + "rounding mode",
    DIV_BY_ZERO = NAME + "Division by zero",
    // The shared prototype object.
    P = {},
    UNDEFINED = void 0,
    NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
  /*
   * Create and return a Big constructor.
   *
   */
  function _Big_() {
    /*
     * The Big constructor and exported function.
     * Create and return a new instance of a Big number object.
     *
     * n {number|string|Big} A numeric value.
     */
    function Big(n) {
      var x = this;
      // Enable constructor usage without new.
      if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n);
      // Duplicate.
      if (n instanceof Big) {
        x.s = n.s;
        x.e = n.e;
        x.c = n.c.slice();
      } else {
        parse(x, n);
      }
      /*
       * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which
       * points to Object.
       */
      x.constructor = Big;
    }
    Big.prototype = P;
    Big.DP = DP;
    Big.RM = RM;
    Big.NE = NE;
    Big.PE = PE;
    Big.version = "5.2.2";
    return Big;
  }
  /*
   * Parse the number or string value passed to a Big constructor.
   *
   * x {Big} A Big number instance.
   * n {number|string} A numeric value.
   */
  function parse(x, n) {
    var e, i, nl;
    // Minus zero?
    if (n === 0 && 1 / n < 0) n = "-0";
    else if (!NUMERIC.test((n += ""))) throw Error(INVALID + "number");
    // Determine sign.
    x.s = n.charAt(0) == "-" ? ((n = n.slice(1)), -1) : 1;
    // Decimal point?
    if ((e = n.indexOf(".")) > -1) n = n.replace(".", "");
    // Exponential form?
    if ((i = n.search(/e/i)) > 0) {
      // Determine exponent.
      if (e < 0) e = i;
      e += +n.slice(i + 1);
      n = n.substring(0, i);
    } else if (e < 0) {
      // Integer.
      e = n.length;
    }
    nl = n.length;
    // Determine leading zeros.
    for (i = 0; i < nl && n.charAt(i) == "0"; ) ++i;
    if (i == nl) {
      // Zero.
      x.c = [(x.e = 0)];
    } else {
      // Determine trailing zeros.
      for (; nl > 0 && n.charAt(--nl) == "0"; );
      x.e = e - i - 1;
      x.c = [];
      // Convert string to array of digits without leading/trailing zeros.
      for (e = 0; i <= nl; ) x.c[e++] = +n.charAt(i++);
    }
    return x;
  }
  /*
   * Round Big x to a maximum of dp decimal places using rounding mode rm.
   * Called by stringify, P.div, P.round and P.sqrt.
   *
   * x {Big} The Big to round.
   * dp {number} Integer, 0 to MAX_DP inclusive.
   * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP)
   * [more] {boolean} Whether the result of division was truncated.
   */
  function round(x, dp, rm, more) {
    var xc = x.c,
      i = x.e + dp + 1;
    if (i < xc.length) {
      if (rm === 1) {
        // xc[i] is the digit after the digit that may be rounded up.
        more = xc[i] >= 5;
      } else if (rm === 2) {
        more =
          xc[i] > 5 ||
          (xc[i] == 5 &&
            (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1));
      } else if (rm === 3) {
        more = more || !!xc[0];
      } else {
        more = false;
        if (rm !== 0) throw Error(INVALID_RM);
      }
      if (i < 1) {
        xc.length = 1;
        if (more) {
          // 1, 0.1, 0.01, 0.001, 0.0001 etc.
          x.e = -dp;
          xc[0] = 1;
        } else {
          // Zero.
          xc[0] = x.e = 0;
        }
      } else {
        // Remove any digits after the required decimal places.
        xc.length = i--;
        // Round up?
        if (more) {
          // Rounding up may mean the previous digit has to be rounded up.
          for (; ++xc[i] > 9; ) {
            xc[i] = 0;
            if (!i--) {
              ++x.e;
              xc.unshift(1);
            }
          }
        }
        // Remove trailing zeros.
        for (i = xc.length; !xc[--i]; ) xc.pop();
      }
    } else if (rm < 0 || rm > 3 || rm !== ~~rm) {
      throw Error(INVALID_RM);
    }
    return x;
  }
  /*
   * Return a string representing the value of Big x in normal or exponential notation.
   * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf.
   *
   * x {Big}
   * id? {number} Caller id.
   *         1 toExponential
   *         2 toFixed
   *         3 toPrecision
   *         4 valueOf
   * n? {number|undefined} Caller's argument.
   * k? {number|undefined}
   */
  function stringify(x, id, n, k) {
    var e,
      s,
      Big = x.constructor,
      z = !x.c[0];
    if (n !== UNDEFINED) {
      if (n !== ~~n || n < (id == 3) || n > MAX_DP) {
        throw Error(id == 3 ? INVALID + "precision" : INVALID_DP);
      }
      x = new Big(x);
      // The index of the digit that may be rounded up.
      n = k - x.e;
      // Round?
      if (x.c.length > ++k) round(x, n, Big.RM);
      // toFixed: recalculate k as x.e may have changed if value rounded up.
      if (id == 2) k = x.e + n + 1;
      // Append zeros?
      for (; x.c.length < k; ) x.c.push(0);
    }
    e = x.e;
    s = x.c.join("");
    n = s.length;
    // Exponential notation?
    if (
      id != 2 &&
      (id == 1 || (id == 3 && k <= e) || e <= Big.NE || e >= Big.PE)
    ) {
      s =
        s.charAt(0) +
        (n > 1 ? "." + s.slice(1) : "") +
        (e < 0 ? "e" : "e+") +
        e;
      // Normal notation.
    } else if (e < 0) {
      for (; ++e; ) s = "0" + s;
      s = "0." + s;
    } else if (e > 0) {
      if (++e > n) for (e -= n; e--; ) s += "0";
      else if (e < n) s = s.slice(0, e) + "." + s.slice(e);
    } else if (n > 1) {
      s = s.charAt(0) + "." + s.slice(1);
    }
    return x.s < 0 && (!z || id == 4) ? "-" + s : s;
  }
  // Prototype/instance methods
  /*
   * Return a new Big whose value is the absolute value of this Big.
   */
  P.abs = function () {
    var x = new this.constructor(this);
    x.s = 1;
    return x;
  };
  /*
   * Return 1 if the value of this Big is greater than the value of Big y,
   *       -1 if the value of this Big is less than the value of Big y, or
   *        0 if they have the same value.
   */
  P.cmp = function (y) {
    var isneg,
      x = this,
      xc = x.c,
      yc = (y = new x.constructor(y)).c,
      i = x.s,
      j = y.s,
      k = x.e,
      l = y.e;
    // Either zero?
    if (!xc[0] || !yc[0]) return !xc[0] ? (!yc[0] ? 0 : -j) : i;
    // Signs differ?
    if (i != j) return i;
    isneg = i < 0;
    // Compare exponents.
    if (k != l) return (k > l) ^ isneg ? 1 : -1;
    j = (k = xc.length) < (l = yc.length) ? k : l;
    // Compare digit by digit.
    for (i = -1; ++i < j; ) {
      if (xc[i] != yc[i]) return (xc[i] > yc[i]) ^ isneg ? 1 : -1;
    }
    // Compare lengths.
    return k == l ? 0 : (k > l) ^ isneg ? 1 : -1;
  };
  /*
   * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded,
   * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
   */
  P.div = function (y) {
    var x = this,
      Big = x.constructor,
      a = x.c, // dividend
      b = (y = new Big(y)).c, // divisor
      k = x.s == y.s ? 1 : -1,
      dp = Big.DP;
    if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP);
    // Divisor is zero?
    if (!b[0]) throw Error(DIV_BY_ZERO);
    // Dividend is 0? Return +-0.
    if (!a[0]) return new Big(k * 0);
    var bl,
      bt,
      n,
      cmp,
      ri,
      bz = b.slice(),
      ai = (bl = b.length),
      al = a.length,
      r = a.slice(0, bl), // remainder
      rl = r.length,
      q = y, // quotient
      qc = (q.c = []),
      qi = 0,
      d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result
    q.s = k;
    k = d < 0 ? 0 : d;
    // Create version of divisor with leading zero.
    bz.unshift(0);
    // CommunicateAdd zeros to make remainder as long as divisor.
    for (; rl++ < bl; ) r.push(0);
    do {
      // n is how many times the divisor goes into current remainder.
      for (n = 0; n < 10; n++) {
        // Compare divisor and remainder.
        if (bl != (rl = r.length)) {
          cmp = bl > rl ? 1 : -1;
        } else {
          for (ri = -1, cmp = 0; ++ri < bl; ) {
            if (b[ri] != r[ri]) {
              cmp = b[ri] > r[ri] ? 1 : -1;
              break;
            }
          }
        }
        // If divisor < remainder, subtract divisor from remainder.
        if (cmp < 0) {
          // Remainder can't be more than 1 digit longer than divisor.
          // Equalise lengths using divisor with extra leading zero?
          for (bt = rl == bl ? b : bz; rl; ) {
            if (r[--rl] < bt[rl]) {
              ri = rl;
              for (; ri && !r[--ri]; ) r[ri] = 9;
              --r[ri];
              r[rl] += 10;
            }
            r[rl] -= bt[rl];
          }
          for (; !r[0]; ) r.shift();
        } else {
          break;
        }
      }
      // CommunicateAdd the digit n to the result array.
      qc[qi++] = cmp ? n : ++n;
      // Update the remainder.
      if (r[0] && cmp) r[rl] = a[ai] || 0;
      else r = [a[ai]];
    } while ((ai++ < al || r[0] !== UNDEFINED) && k--);
    // Leading zero? Do not remove if result is simply zero (qi == 1).
    if (!qc[0] && qi != 1) {
      // There can't be more than one zero.
      qc.shift();
      q.e--;
    }
    // Round?
    if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED);
    return q;
  };
  /*
   * Return true if the value of this Big is equal to the value of Big y, otherwise return false.
   */
  P.eq = function (y) {
    return !this.cmp(y);
  };
  /*
   * Return true if the value of this Big is greater than the value of Big y, otherwise return
   * false.
   */
  P.gt = function (y) {
    return this.cmp(y) > 0;
  };
  /*
   * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise
   * return false.
   */
  P.gte = function (y) {
    return this.cmp(y) > -1;
  };
  /*
   * Return true if the value of this Big is less than the value of Big y, otherwise return false.
   */
  P.lt = function (y) {
    return this.cmp(y) < 0;
  };
  /*
   * Return true if the value of this Big is less than or equal to the value of Big y, otherwise
   * return false.
   */
  P.lte = function (y) {
    return this.cmp(y) < 1;
  };
  /*
   * Return a new Big whose value is the value of this Big minus the value of Big y.
   */
  P.minus = P.sub = function (y) {
    var i,
      j,
      t,
      xlty,
      x = this,
      Big = x.constructor,
      a = x.s,
      b = (y = new Big(y)).s;
    // Signs differ?
    if (a != b) {
      y.s = -b;
      return x.plus(y);
    }
    var xc = x.c.slice(),
      xe = x.e,
      yc = y.c,
      ye = y.e;
    // Either zero?
    if (!xc[0] || !yc[0]) {
      // y is non-zero? x is non-zero? Or both are zero.
      return yc[0] ? ((y.s = -b), y) : new Big(xc[0] ? x : 0);
    }
    // Determine which is the bigger number. Prepend zeros to equalise exponents.
    if ((a = xe - ye)) {
      if ((xlty = a < 0)) {
        a = -a;
        t = xc;
      } else {
        ye = xe;
        t = yc;
      }
      t.reverse();
      for (b = a; b--; ) t.push(0);
      t.reverse();
    } else {
      // Exponents equal. Check digit by digit.
      j = ((xlty = xc.length < yc.length) ? xc : yc).length;
      for (a = b = 0; b < j; b++) {
        if (xc[b] != yc[b]) {
          xlty = xc[b] < yc[b];
          break;
        }
      }
    }
    // x < y? Point xc to the array of the bigger number.
    if (xlty) {
      t = xc;
      xc = yc;
      yc = t;
      y.s = -y.s;
    }
    /*
     * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only
     * needs to start at yc.length.
     */
    if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--; ) xc[i++] = 0;
    // Subtract yc from xc.
    for (b = i; j > a; ) {
      if (xc[--j] < yc[j]) {
        for (i = j; i && !xc[--i]; ) xc[i] = 9;
        --xc[i];
        xc[j] += 10;
      }
      xc[j] -= yc[j];
    }
    // Remove trailing zeros.
    for (; xc[--b] === 0; ) xc.pop();
    // Remove leading zeros and adjust exponent accordingly.
    for (; xc[0] === 0; ) {
      xc.shift();
      --ye;
    }
    if (!xc[0]) {
      // n - n = +0
      y.s = 1;
      // Result must be zero.
      xc = [(ye = 0)];
    }
    y.c = xc;
    y.e = ye;
    return y;
  };
  /*
   * Return a new Big whose value is the value of this Big modulo the value of Big y.
   */
  P.mod = function (y) {
    var ygtx,
      x = this,
      Big = x.constructor,
      a = x.s,
      b = (y = new Big(y)).s;
    if (!y.c[0]) throw Error(DIV_BY_ZERO);
    x.s = y.s = 1;
    ygtx = y.cmp(x) == 1;
    x.s = a;
    y.s = b;
    if (ygtx) return new Big(x);
    a = Big.DP;
    b = Big.RM;
    Big.DP = Big.RM = 0;
    x = x.div(y);
    Big.DP = a;
    Big.RM = b;
    return this.minus(x.times(y));
  };
  /*
   * Return a new Big whose value is the value of this Big plus the value of Big y.
   */
  P.plus = P.add = function (y) {
    var t,
      x = this,
      Big = x.constructor,
      a = x.s,
      b = (y = new Big(y)).s;
    // Signs differ?
    if (a != b) {
      y.s = -b;
      return x.minus(y);
    }
    var xe = x.e,
      xc = x.c,
      ye = y.e,
      yc = y.c;
    // Either zero? y is non-zero? x is non-zero? Or both are zero.
    if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0);
    xc = xc.slice();
    // Prepend zeros to equalise exponents.
    // Note: reverse faster than unshifts.
    if ((a = xe - ye)) {
      if (a > 0) {
        ye = xe;
        t = yc;
      } else {
        a = -a;
        t = xc;
      }
      t.reverse();
      for (; a--; ) t.push(0);
      t.reverse();
    }
    // Point xc to the longer array.
    if (xc.length - yc.length < 0) {
      t = yc;
      yc = xc;
      xc = t;
    }
    a = yc.length;
    // Only start adding at yc.length - 1 as the further digits of xc can be left as they are.
    for (b = 0; a; xc[a] %= 10) b = ((xc[--a] = xc[a] + yc[a] + b) / 10) | 0;
    // No need to check for zero, as +x + +y != 0 && -x + -y != 0
    if (b) {
      xc.unshift(b);
      ++ye;
    }
    // Remove trailing zeros.
    for (a = xc.length; xc[--a] === 0; ) xc.pop();
    y.c = xc;
    y.e = ye;
    return y;
  };
  /*
   * Return a Big whose value is the value of this Big raised to the power n.
   * If n is negative, round to a maximum of Big.DP decimal places using rounding
   * mode Big.RM.
   *
   * n {number} Integer, -MAX_POWER to MAX_POWER inclusive.
   */
  P.pow = function (n) {
    var x = this,
      one = new x.constructor(1),
      y = one,
      isneg = n < 0;
    if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER)
      throw Error(INVALID + "exponent");
    if (isneg) n = -n;
    for (;;) {
      if (n & 1) y = y.times(x);
      n >>= 1;
      if (!n) break;
      x = x.times(x);
    }
    return isneg ? one.div(y) : y;
  };
  /*
   * Return a new Big whose value is the value of this Big rounded using rounding mode rm
   * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a
   * multiple of 10**-dp.
   * If dp is not specified, round to 0 decimal places.
   * If rm is not specified, use Big.RM.
   *
   * dp? {number} Integer, -MAX_DP to MAX_DP inclusive.
   * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP)
   */
  P.round = function (dp, rm) {
    var Big = this.constructor;
    if (dp === UNDEFINED) dp = 0;
    else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP)
      throw Error(INVALID_DP);
    return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm);
  };
  /*
   * Return a new Big whose value is the square root of the value of this Big, rounded, if
   * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM.
   */
  P.sqrt = function () {
    var r,
      c,
      t,
      x = this,
      Big = x.constructor,
      s = x.s,
      e = x.e,
      half = new Big(0.5);
    // Zero?
    if (!x.c[0]) return new Big(x);
    // Negative?
    if (s < 0) throw Error(NAME + "No square root");
    // Estimate.
    s = Math.sqrt(x + "");
    // Math.sqrt underflow/overflow?
    // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent.
    if (s === 0 || s === 1 / 0) {
      c = x.c.join("");
      if (!((c.length + e) & 1)) c += "0";
      s = Math.sqrt(c);
      e = (((e + 1) / 2) | 0) - (e < 0 || e & 1);
      r = new Big(
        (s == 1 / 0
          ? "1e"
          : (s = s.toExponential()).slice(0, s.indexOf("e") + 1)) + e
      );
    } else {
      r = new Big(s);
    }
    e = r.e + (Big.DP += 4);
    // Newton-Raphson iteration.
    do {
      t = r;
      r = half.times(t.plus(x.div(t)));
    } while (t.c.slice(0, e).join("") !== r.c.slice(0, e).join(""));
    return round(r, (Big.DP -= 4), Big.RM);
  };
  /*
   * Return a new Big whose value is the value of this Big times the value of Big y.
   */
  P.times = P.mul = function (y) {
    var c,
      x = this,
      Big = x.constructor,
      xc = x.c,
      yc = (y = new Big(y)).c,
      a = xc.length,
      b = yc.length,
      i = x.e,
      j = y.e;
    // Determine sign of result.
    y.s = x.s == y.s ? 1 : -1;
    // Return signed 0 if either 0.
    if (!xc[0] || !yc[0]) return new Big(y.s * 0);
    // Initialise exponent of result as x.e + y.e.
    y.e = i + j;
    // If array xc has fewer digits than yc, swap xc and yc, and lengths.
    if (a < b) {
      c = xc;
      xc = yc;
      yc = c;
      j = a;
      a = b;
      b = j;
    }
    // Initialise coefficient array of result with zeros.
    for (c = new Array((j = a + b)); j--; ) c[j] = 0;
    // Multiply.
    // i is initially xc.length.
    for (i = b; i--; ) {
      b = 0;
      // a is yc.length.
      for (j = a + i; j > i; ) {
        // Current sum of products at this digit position, plus carry.
        b = c[j] + yc[i] * xc[j - i - 1] + b;
        c[j--] = b % 10;
        // carry
        b = (b / 10) | 0;
      }
      c[j] = (c[j] + b) % 10;
    }
    // Increment result exponent if there is a final carry, otherwise remove leading zero.
    if (b) ++y.e;
    else c.shift();
    // Remove trailing zeros.
    for (i = c.length; !c[--i]; ) c.pop();
    y.c = c;
    return y;
  };
  /*
   * Return a string representing the value of this Big in exponential notation to dp fixed decimal
   * places and rounded using Big.RM.
   *
   * dp? {number} Integer, 0 to MAX_DP inclusive.
   */
  P.toExponential = function (dp) {
    return stringify(this, 1, dp, dp);
  };
  /*
   * Return a string representing the value of this Big in normal notation to dp fixed decimal
   * places and rounded using Big.RM.
   *
   * dp? {number} Integer, 0 to MAX_DP inclusive.
   *
   * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
   * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
   */
  P.toFixed = function (dp) {
    return stringify(this, 2, dp, this.e + dp);
  };
  /*
   * Return a string representing the value of this Big rounded to sd significant digits using
   * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent
   * the integer part of the value in normal notation.
   *
   * sd {number} Integer, 1 to MAX_DP inclusive.
   */
  P.toPrecision = function (sd) {
    return stringify(this, 3, sd, sd - 1);
  };
  /*
   * Return a string representing the value of this Big.
   * Return exponential notation if this Big has a positive exponent equal to or greater than
   * Big.PE, or a negative exponent equal to or less than Big.NE.
   * Omit the sign for negative zero.
   */
  P.toString = function () {
    return stringify(this);
  };
  /*
   * Return a string representing the value of this Big.
   * Return exponential notation if this Big has a positive exponent equal to or greater than
   * Big.PE, or a negative exponent equal to or less than Big.NE.
   * Include the sign for negative zero.
   */
  P.valueOf = P.toJSON = function () {
    return stringify(this, 4);
  };
  // Export
  Big = _Big_();
  Big["default"] = Big.Big = Big;
  //AMD.
  if (typeof define === "function" && define.amd) {
    define(function () {
      return Big;
    });
    // Node and other CommonJS-like environments that support module.exports.
  } else if (typeof module !== "undefined" && module.exports) {
    module.exports = Big;
    //Browser.
  } else {
    GLOBAL.Big = Big;
  }
})(this);