zss
2025-03-04 b64d6db597d332c699f84e4928f6d3e5551851f1
src/views/business/productOrder/index.vue
@@ -3,8 +3,7 @@
    <div class="search">
      <el-form :model="entity" ref="entity" size="small" :inline="true">
        <el-form-item label="委托编号" prop="entrustCode">
          <el-input v-model="entity.entrustCode" clearable placeholder="请输入"
                    size="small"
          <el-input v-model="entity.entrustCode" clearable placeholder="请输入" size="small"
                    @keyup.enter.native="refreshTable">
          </el-input>
        </el-form-item>
@@ -13,11 +12,12 @@
                    @keyup.enter.native="refreshTable"></el-input>
        </el-form-item>
        <el-form-item label="样品型号" prop="sampleModel">
          <el-input v-model="entity.sampleModel" clearable placeholder="请输入"
                    size="small" @keyup.enter.native="refreshTable()"></el-input>
          <el-input v-model="entity.sampleModel" clearable placeholder="请输入" size="small"
            @keyup.enter.native="refreshTable()"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button :icon="!more?'el-icon-arrow-down':'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" @click="more=!more">{{!more?'更多':'收起'}}</el-button>
          <el-button :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
            @click="more = !more">{{ !more ? '更多' : '收起' }}</el-button>
          <el-button size="small" @click="refresh()">重 置</el-button>
          <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
        </el-form-item>
@@ -27,13 +27,8 @@
          </el-input>
        </el-form-item>
        <el-form-item label="下单时间" prop="createTime" v-if="more">
          <el-date-picker v-model="entity.createTime" clearable
                          format="yyyy-MM-dd"
                          placeholder="选择日期"
                          size="small"
                          style="width:100%"
                          type="date"
                          value-format="yyyy-MM-dd HH:mm:ss">
          <el-date-picker v-model="entity.createTime" clearable format="yyyy-MM-dd" placeholder="选择日期" size="small"
            style="width:100%" type="date" value-format="yyyy-MM-dd HH:mm:ss">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="委托人" prop="prepareUser" v-if="more">
@@ -51,21 +46,22 @@
    <div class="table-tab">
      <div>
        <ul class="tab">
          <li v-for="(m,i) in tabList" :key="i+'afgh'" :class="{active:i==tabIndex}" @click="handleTab(m,i)">{{m.label}}</li>
          <li v-for="(m, i) in tabList" :key="i + 'afgh'" :class="{ active: i == tabIndex }" @click="handleTab(m, i)">{{ m.label }}
          </li>
        </ul>
      </div>
      <div>
        <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small" @click="downLoad">导出</el-button>
        <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 6" size="small"
          @click="downLoad">导出</el-button>
        <el-button v-if="tabIndex === 1" size="small" type="primary" @click="openAddIns">添加检验项</el-button>
        <el-button size="small" type="primary" @click="openPrint">标签打印</el-button>
        <el-button size="small" type="primary" @click="playOrder(1)">下单</el-button>
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="column"
                  :isSelection="true" :handleSelectionChange="selectMethod"
                  @pagination="pagination" :height="'calc(100vh - 280px)'" key="tableData"
                  :page="page" :tableLoading="tableLoading"></lims-table>
      <lims-table :tableData="tableData" :column="column" :isSelection="true" :handleSelectionChange="selectMethod"
        @pagination="pagination" :height="'calc(100vh - 280px)'" :key="upIndex" :page="page"
        :tableLoading="tableLoading"></lims-table>
    </div>
    <div>
      <!-- 审核 -->
@@ -123,7 +119,8 @@
            <el-col class="search_thing" style="width: 95%;">
              <div class="search_label"><span class="required-span">* </span>指派人员:</div>
              <div class="search_input">
                <el-select v-model="distributeData.userId" clearable filterable placeholder="请选择" size="small" style="width: 100%;" @change="changeUser">
                <el-select v-model="distributeData.userId" clearable filterable placeholder="请选择" size="small"
                  style="width: 100%;" @change="changeUser">
                  <el-option v-for="(item,i) in personList" :key="i+'gbnm.'" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
@@ -132,8 +129,10 @@
            <el-col class="search_thing" style="width: 95%;">
              <div class="search_label"><span class="required-span" >* </span>试验室:</div>
              <div class="search_input">
                <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="请选择" size="small" style="width: 100%;">
                  <el-option v-for="(item,i) in sonLaboratoryList" :key="i+'oooo'" :label="item.label" :value="item.value">
                <el-select v-model="distributeData.sonLaboratory" clearable filterable placeholder="请选择" size="small"
                  style="width: 100%;">
                  <el-option v-for="(item, i) in sonLaboratoryList" :key="i + 'oooo'" :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </div>
@@ -149,29 +148,28 @@
      </el-dialog>
      <el-dialog :visible.sync="dataDialogVisible" title="数据查看" width="80%">
        <div v-if="dataDialogVisible">
          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn"
                      @pagination="tableDataLookPagination" height="500px" key="tableDataLook"
                      :page="tableDataLookPage" :tableLoading="tableDataLookTableLoading"></lims-table>
          <lims-table :tableData="tableDataLook" :column="tableDataLookColumn" @pagination="tableDataLookPagination"
            height="500px" key="tableDataLook" :page="tableDataLookPage"
            :tableLoading="tableDataLookTableLoading"></lims-table>
        </div>
      </el-dialog>
      <el-dialog :visible.sync="filesDialogVisible" title="附件查看" width="80%">
        <div v-if="filesDialogVisible">
          <lims-table :tableData="tableDataFile" :column="columnFile"
                      @pagination="paginationFile" height="500px" key="tableDataFile"
                      :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
          <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px"
            key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table>
        </div>
      </el-dialog>
      <el-dialog :title="deleteTilte" :visible.sync="deleteDialogVisible" width="80%">
        <div v-if="deleteDialogVisible" style="height: 70vh;overflow-y: auto;">
          <lims-table :tableData="componentDataDelete" :column="columnDelete"
                      :isSelection="true" :handleSelectionChange="selectDelete"
                      @pagination="paginationDelete" height="500px" key="componentDataDelete"
                      :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
          <lims-table :tableData="componentDataDelete" :column="columnDelete" :isSelection="true"
            :handleSelectionChange="selectDelete" @pagination="paginationDelete" height="500px"
            key="componentDataDelete" :page="pageDelete" :tableLoading="tableLoadingDelete"></lims-table>
        </div>
        <span slot="footer" class="dialog-footer">
          <el-row>
            <el-button @click="handleNo">{{deleteTilte=='撤销'?'取 消':'不通过'}}</el-button>
            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{deleteTilte=='撤销'?'确 定':'通 过'}}</el-button>
            <el-button :loading="printLoading" type="primary" @click="submitDelete">{{ deleteTilte == '撤销' ? '确 定' : '通
              过'}}</el-button>
          </el-row>
        </span>
      </el-dialog>
@@ -179,13 +177,11 @@
    <el-dialog :visible.sync="printDialogVisible" title="标签打印" top="5vh" width="40%">
      <div v-loading="loadPint" style="width:100%;height: 400px;overflow-y: auto;">
        <div class="dia_body">
          <el-checkbox
            v-model="checkAll"
            :indeterminate="isIndeterminate"
            style="margin: 10px 5px;"
          <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" style="margin: 10px 5px;"
            @change="handleCheckAllChange">全选</el-checkbox>
          <el-checkbox-group v-model="checkIndexList" @change="changePrintCode()">
            <el-card v-for="(item, i) in qrData" :key="i+'wwwww'" class="box-card" style="margin-bottom: 15px; font-size: 16px !important;">
            <el-card v-for="(item, i) in qrData" :key="i + 'wwwww'" class="box-card"
              style="margin-bottom: 15px; font-size: 16px !important;">
              <el-checkbox :key="i" :label="i" style="position: relative;top:-20px;left:5px"><br></el-checkbox>
              <div>
                <el-row style="font-size: 14px;padding-left: 20px;">
@@ -199,7 +195,8 @@
                  </div>
                  <div style="margin-left: 50px;width: 100%;">
                    <el-row>
                      <el-col  style="font-weight: bold;font-size: 14px;"><span>样品编号:&nbsp; </span>{{ item.sampleCode }}</el-col>
                      <el-col style="font-weight: bold;font-size: 14px;"><span>样品编号:&nbsp; </span>{{ item.sampleCode
                        }}</el-col>
                    </el-row>
                    <el-row style="margin-top: 1px;font-size: 14px;">
                      <el-col  style="font-weight: bold;"><span>委托单号:&nbsp; </span>{{ item.code }}</el-col>
@@ -219,7 +216,8 @@
                          <el-radio :label="0" style="font-weight: bold;margin-right: 7px;">待检</el-radio>
                          <el-radio :label="1" style="font-weight: bold;margin-right: 7px;">在检</el-radio>
                          <el-radio :label="2" style="font-weight: bold;margin-right: 7px;">已检</el-radio>
                        </el-radio-group><el-radio v-model="item.isLeave" :label="1" disabled style="font-weight: bold;margin-top: 7px;">留样</el-radio></el-col>
                        </el-radio-group><el-radio v-model="item.isLeave" :label="1" disabled
                          style="font-weight: bold;margin-top: 7px;">留样</el-radio></el-col>
                    </el-row>
                  </div>
                </div>
@@ -235,9 +233,11 @@
        </el-row>
      </span>
    </el-dialog>
    <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
    <div class="el-dialog__body"
      style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
      <div id="printMOrder" ref="printMOrder" class="printMOrder">
        <el-card v-for="(item, i) in checkDataList" :key="i+'uuuuu'" class="box-card" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
        <el-card v-for="(item, i) in checkDataList" :key="i + 'uuuuu'" class="box-card"
          style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
          <div style="display: flex;">
            <div>
              <el-col :offset="2" :span="10">
@@ -246,7 +246,8 @@
            </div>
            <div style="margin-left: 0.32cm;line-height: 0.22cm;">
              <el-row>
                <el-col  class="single-line-ellipsis" style="font-size: 0.20cm;width: 4cm;"><span>样品编号:&nbsp; </span>{{ item.sampleCode }}</el-col>
                <el-col class="single-line-ellipsis" style="font-size: 0.20cm;width: 4cm;"><span>样品编号:&nbsp; </span>{{
                  item.sampleCode }}</el-col>
              </el-row>
              <el-row style="font-size: 0.20cm;">
                <el-col><span>委托单号:&nbsp; </span>{{ item.code }}</el-col>
@@ -263,7 +264,8 @@
              <el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
                <el-col  style="display: flex;align-items: center;"><span>样品状态:&nbsp;
                  </span>
                  <span style="white-space: nowrap;"><span v-if="item.insState==0">√</span><span v-if="item.insState!=0" class="scor"></span>待检
                  <span style="white-space: nowrap;"><span v-if="item.insState == 0">√</span><span v-if="item.insState != 0"
                      class="scor"></span>待检
                    <span v-if="item.insState==1">√</span><span v-if="item.insState!=1" class="scor"></span>在检
                    <span v-if="item.insState==2">√</span><span v-if="item.insState!=2" class="scor"></span>已检
                    <span v-if="item.isLeave==1">√</span><span v-if="item.isLeave!=1" class="scor"></span>留样</span>
@@ -288,8 +290,7 @@
      </span>
    </el-dialog>
    <!--标签打印弹框-->
    <print-dialog v-if="printDialog" ref="printDialog"
                  :printDialog="printDialog"
    <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog"
                  @closePrintDialog="closePrintDialog"></print-dialog>
    <!--添加遗漏检验项弹框-->
    <add-inspection-dia v-if="addInspectionDia" ref="addInspectionDia"></add-inspection-dia>
@@ -329,6 +330,7 @@
        orderType: '',
        state: '',
      },
      upIndex: 0,
      tableData: [],
      tableLoading: false,
      column: [
@@ -753,6 +755,7 @@
      const params = {...this.entity, state: this.tabList[this.tabIndex].value}
      this.tableLoading = true
      selectInsOrderParameter(params).then(res => {
        this.upIndex++
        this.tableLoading = false
        if (res.code === 200) {
          this.tableData = res.data.records
@@ -866,7 +869,6 @@
    // 导出记录
    downLoad () {
      rawAllInsOrderExport({...this.entity}).then(res => {
        this.$message.success('导出成功')
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, '委托检测信息导出.xlsx');
      }).catch(err => {
@@ -1227,6 +1229,7 @@
  justify-content: space-between;
  align-items: center;
}
.tab {
  list-style-type: none;
  display: flex;
@@ -1256,9 +1259,11 @@
  border-color: #3A7BFA;
  color: #3A7BFA;
}
.box-card >>>.el-radio__inner {
  border-radius: 2px !important;
}
.box-card >>>.el-radio__input.is-checked .el-radio__inner::after {
  content: '';
  width: 8px;
@@ -1275,12 +1280,15 @@
  border-radius: 0px;
  background: none;
}
>>>.el-radio__label{
  color: #000 !important;
}
.el-dialog__body >>>.el-radio__label{
  font-size: 8px;
}
.el-dialog__body >>>.el-radio__input.is-checked .el-radio__inner::after {
  content: '';
  width: 4px;
@@ -1297,31 +1305,40 @@
  border-radius: 0px;
  background: none;
}
>>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
  background: #3A7BFA;
}
.el-dialog__body >>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
  background: transparent;
}
.el-dialog__body >>>.el-radio__inner{
  width: 8px !important;
  height: 8px !important;
}
.el-dialog__body >>>.el-radio__label{
  padding-left: 2px !important;
}
.el-dialog__body >>>.el-card__body{
  padding: 0 !important;
}
.el-dialog__body >>>.el-card {
  border: none;
}
.el-dialog__body >>>.el-radio__input.is-disabled .el-radio__inner{
  border-color: #000 !important;
}
.el-dialog__body >>>.el-radio__input.is-disabled.is-checked .el-radio__inner{
  border: none !important;
}
.scor{
  width: 0.01cm;
  height: 0.01cm;
@@ -1329,6 +1346,7 @@
  border: 1px solid #000;
  display: inline-block;
}
.ellipsis-multiline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
@@ -1336,8 +1354,11 @@
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  max-height: 3.0em; /* 高度为字体大小的两倍 */
  line-height: 1.5em; /* 行高 */
  height: 3.0em; /* 高度为行高的两倍 */
  max-height: 3.0em;
  /* 高度为字体大小的两倍 */
  line-height: 1.5em;
  /* 行高 */
  height: 3.0em;
  /* 高度为行高的两倍 */
}
</style>