spring
2025-04-08 4f94a66bc8ad9a57295f161de9195d5528b1d181
src/views/business/productSamplingInfo/index.vue
@@ -8,8 +8,8 @@
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">查 询</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="refresh">重 置</el-button>
          <el-button type="primary" size="mini" @click="refreshTable">查询</el-button>
          <el-button size="mini" @click="refresh">重置</el-button>
        </el-form-item>
      </el-form>
      <div>
@@ -19,9 +19,10 @@
    <div>
      <div class="table">
        <ul class="tab">
          <li v-for="(m, i) in tabList" :key="i" :class="{ active: i === tabIndex }" @click="handleTab(m, i)">{{ m.label }}</li>
          <li v-for="(m, i) in tabList" :key="i" :class="{ active: i === tabIndex }" @click="handleTab(m, i)">{{ m.label
            }}</li>
        </ul>
        <!--季度-->
        <!--可靠性-->
        <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
          :height="'calc(100vh - 290px)'" :page="page" :tableLoading="tableLoading"></lims-table>
        <!--年度-->
@@ -34,8 +35,8 @@
      <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px">
        <div style="width: 30%;display: flex;align-items: center;">
          <el-input v-if="operationType !== 'view'" v-model="currentYear" size="small" />
          <span v-if="operationType === 'view'"
            style="width: 160px;font-size: 18px;font-weight: 600">{{ currentYear }}</span>
          <span v-if="operationType === 'view'" style="width: 160px;font-size: 18px;font-weight: 600">{{ currentYear
            }}</span>
        </div>
        <div v-if="operationType !== 'view'">
          <el-button size="small" type="primary" @click="addQuarter">添加</el-button>
@@ -44,7 +45,7 @@
      </div>
      <div>
        <el-table :data="yearItems" border height="450" style="width: 100%"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
          :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }">
          <el-table-column label="类别" prop="yearType" width="240">
            <template slot-scope="{row}">
              <template v-if="operationType !== 'view'">
@@ -251,7 +252,7 @@
import { selectUserCondition } from "@/api/performance/class";
export default {
  name: "b1-product-sampling-info",
  name: "ProductSamplingInfo",
  // import 引入的组件需要注入到对象中才能使用
  components: { limsTable, AddQuarterItem },
  data() {
@@ -261,7 +262,7 @@
      tabIndex: 0,
      tabList: [
        {
          label: '季度',
          label: '可靠性',
          value: 0
        },
        {
@@ -316,7 +317,7 @@
      ],
      page: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      tableData1: [],
@@ -362,7 +363,7 @@
      ],
      page1: {
        total: 0,
        size: 10,
        size: 20,
        current: 1
      },
      yearSampleDia: false, // 年度抽样
@@ -434,15 +435,15 @@
      this.page1.size = page.limit
      this.refreshTable()
    },
    // 编辑季度抽样
    // 编辑可靠性抽样
    editForm(row) {
      this.$refs.addQuarterItem.openDia(row, 'edit')
    },
    // 查看季度抽样
    // 查看可靠性抽样
    viewQuarterInfo(row) {
      this.$refs.addQuarterItem.openDia(row, 'view')
    },
    // 删除季度抽样
    // 删除可靠性抽样
    deleteQuarterInfo(row) {
      this.$confirm('是否删除当前数据?', "警告", {
        confirmButtonText: "确定",
@@ -463,7 +464,7 @@
      finalReportQuarter({ quarterId: row.quarterId, random: randomNum }).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '季度抽样信息导出.docx')
        this.$download.saveAs(blob, '可靠性抽样信息导出.docx')
      })
    },
    // 年度下载
@@ -610,7 +611,7 @@
      return 'height: calc(100% - ' + '44' + 'px)'
    },
    getUserList() {
      selectUserCondition({ type: 0 }).then((res) => {
      selectUserCondition().then((res) => {
        this.userList = res.data;
      })
    },