Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue
@@ -1,20 +1,13 @@
<template>
  <div>
    <div style="
        display: flex;
        justify-content: flex-end;
        margin-right: 20px;
        margin-bottom: 20px;
      ">
      <el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">添加
      </el-button>
      <el-button icon="el-icon-download" size="small" @click="importExcel">
        导出excel
      </el-button>
    <div style="display: flex;justify-content: flex-end;margin-bottom: 10px;">
      <el-button size="small" type="primary" @click="searchList">刷新</el-button>
      <el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">添加</el-button>
      <el-button icon="el-icon-download" size="small" @click="importExcel">导出excel</el-button>
    </div>
    <div class="table">
      <limsTable :column="tableColumn" :height="'calc(100vh - 20em)'" :table-data="storageTableData"
        :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination">
        :table-loading="tableLoading" :page="page" @pagination="pagination">
      </limsTable>
    </div>
@@ -100,7 +93,7 @@
          <el-button size="mini" type="primary" @click="addTableData">添加
          </el-button>
        </div>
        <el-table :data="consumables" style="margin-top: 10px">
        <el-table :data="consumables" style="margin-top: 10px" :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
          <el-table-column label="编号" type="index" width="120px"></el-table-column>
          <el-table-column label="货号" prop="itemNumber"></el-table-column>
          <el-table-column label="类别" prop="type"></el-table-column>
@@ -253,12 +246,6 @@
      consumableOptions: [],
      options: [],
      storageTableData: [],
      searchForm: {
        orderBy: {
          field: "id",
          order: "desc",
        },
      },
      saveLoading: false,
    };
  },
@@ -337,7 +324,6 @@
      if (type === 'edit') {
        this.dialogType = "update";
        selectStoreById({ id: row.id }).then(res => {
          if (res.code === 201) return
          this.consumables = res.data.consumables
          this.form = { ...res.data.store }
        }).catch(err => {
@@ -351,7 +337,7 @@
    // 查询列表
    searchList() {
      this.tableLoading = true
      storeList({ ...this.page, ...this.searchForm }).then(res => {
      storeList({ ...this.page}).then(res => {
        this.tableLoading = false
        if (res.code === 200) {
          this.storageTableData = res.data.records