From a904da0bb0764bec4261ee7f1fce103d3c155339 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 07 三月 2025 09:42:22 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev

---
 src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue |  166 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 166 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
new file mode 100644
index 0000000..80106ab
--- /dev/null
+++ b/src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
@@ -0,0 +1,166 @@
+<template>
+  <div class="capacity-scope">
+    <div class="search">
+      <div>
+        <el-form :model="form" ref="form" size="small" :inline="true">
+          <el-form-item label="鐗╄川鍚嶇О">
+            <el-input v-model="form.name"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button @click="reset">閲� 缃�</el-button>
+            <el-button type="primary" @click="getTableData">鏌� 璇�</el-button>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div>
+        <el-button icon="el-icon-plus" size="small" type="primary" @click="openDialog">娣诲姞楠屾敹</el-button>
+        <el-button size="small" type="primary" @click="exportExcel">瀵煎嚭</el-button>
+      </div>
+    </div>
+    <div class="table">
+      <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination"
+        :page="page" :tableLoading="tableLoading">
+        <template slot="action" slot-scope="{ row }">
+          <el-button type="text" @click="edit(row)">缂栬緫</el-button>
+        </template>
+      </lims-table>
+    </div>
+    <AddRecord ref="addRecordRef" v-if="addRecordRef" @submit="submit"></AddRecord>
+  </div>
+</template>
+
+<script>
+import limsTable from '@/components/Table/lims-table.vue'
+import AddRecord from './component/AddRecord.vue';
+import {
+  getPageAcceptance, getAcceptanceDetails, exportFeStandardSubstanceAcceptance, updateAcceptance, addAcceptance
+} from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept'
+export default {
+  components: {
+    limsTable,
+    AddRecord
+  },
+  data() {
+    return {
+      form: {
+        name: undefined
+      },
+      addRecordRef: false,
+      columns: [
+        {
+          label: "鍑哄満缂栧彿",
+          prop: "factoryNum"
+        },
+        {
+          label: "鏈夋晥鏈�",
+          prop: "effectiveDate"
+        },
+        {
+          label: "鐢熶骇鍘傚",
+          prop: "factoryManufacturer"
+        },
+        {
+          label: "鏂囨。缂栧彿",
+          prop: "fileNum"
+        },
+        {
+          label: "鏍囧噯鐗╄川鍚嶇О",
+          prop: "name"
+        },
+        {
+          label: "瑙勬牸鍨嬪彿",
+          prop: "model"
+        },
+        {
+          label: "绠$悊缂栧彿",
+          prop: "manageNum"
+        },
+        {
+          label: "瀛樻斁浣嶇疆",
+          prop: "position"
+        },
+        // {
+        //     label: "搴忓垪鍙�",
+        //     prop: "manageNum"
+        // },
+        {
+          label: "鎻愪氦鏃ユ湡",
+          prop: "acquisitionDate"
+        },
+        {
+          label: "鏁伴噺",
+          prop: "quantity"
+        },
+        {
+          fixed: "right",
+          label: "鎿嶄綔",
+          align: "center",
+          dataType: "slot",
+          slot: "action",
+        },
+      ],
+      tableData: [],
+      page: {
+        total: 0,
+        size: 10,
+        current: 1
+      },
+      tableLoading: false,
+    }
+  },
+  mounted() {
+    this.getTableData()
+  },
+  methods: {
+    getTableData() {
+      getPageAcceptance(this.form).then(res => {
+        this.tableData = res.data.records;
+        this.page.total = res.data.total;
+      })
+    },
+    openDialog() {
+      this.addRecordRef = true;
+      this.$nextTick(() => {
+        this.$refs.addRecordRef.openDialog()
+      })
+    },
+    submit() {
+      this.addRecordRef = false;
+      this.getTableData()
+    },
+    edit(row) {
+      this.addRecordRef = true;
+      this.$nextTick(() => {
+        this.$refs.addRecordRef.openDialog(row.id)
+      })
+    },
+    reset() {
+      this.form.name = undefined
+      this.getTableData()
+    },
+    async exportExcel() {
+      exportFeStandardSubstanceAcceptance().then(res => {
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '鏍囧噯鐗╄川楠屾敹.xlsx');
+      })
+    },
+    // 鍒嗛〉鍒囨崲
+    pagination(page) {
+      this.page.size = page.limit
+      this.getTableData()
+    },
+  }
+}
+</script>
+
+<style scoped>
+.capacity-scope {
+  padding: 20px !important;
+}
+
+.search {
+  height: 46px;
+  display: flex;
+  justify-content: space-between;
+}
+</style>

--
Gitblit v1.9.3