From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期二, 29 四月 2025 13:25:29 +0800
Subject: [PATCH] Merge branch 'dev' into dev_tides

---
 src/views/CNAS/process/disposal/sampleReceipt/index.vue |  340 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 340 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/process/disposal/sampleReceipt/index.vue b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
new file mode 100644
index 0000000..46ada41
--- /dev/null
+++ b/src/views/CNAS/process/disposal/sampleReceipt/index.vue
@@ -0,0 +1,340 @@
+<template>
+  <div class="capacity-scope">
+    <div style="display: flex;justify-content: space-between;align-items: flex-start">
+      <el-form :model="queryParams0" ref="queryParams0" size="small" :inline="true">
+        <el-form-item label="鏀舵牱鏃ユ湡" prop="receiveDate">
+          <el-date-picker v-model="queryParams0.receiveDate" type="date" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+                          value-format="yyyy-MM-dd" size="small" @change="refreshTable()">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+          <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+        </el-form-item>
+      </el-form>
+      <el-button size="small" @click="handleDown0">瀵煎嚭</el-button>
+    </div>
+
+    <div class="table">
+      <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading0"
+                  key="tableData0"
+                  :height="'calc(100vh - 240px)'" :page="page0" @pagination="pagination0">
+        <div slot="action" slot-scope="scope">
+          <el-button type="text" @click="handleAdd(scope.row)">缂栬緫</el-button>
+          <el-button type="text" @click="delRow(scope.row)">
+            <span style="color: #F56C6C">鍒犻櫎</span>
+          </el-button>
+        </div>
+      </lims-table>
+    </div>
+    <!-- 鏂板鏍峰搧 -->
+    <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px">
+      <el-row>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏀舵牱鏃ユ湡锛�</div>
+            <div class="search_input">
+              <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+                              value-format="yyyy-MM-dd" style="width: 100%;">
+              </el-date-picker>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏍峰搧鍚嶇О锛�</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+                                                v-model="addInfo.sampleName"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏍峰搧缂栧彿锛�</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+                                                v-model="addInfo.sampleCode"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏁伴噺锛�</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+                                                v-model="addInfo.num"></el-input>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏉ユ牱鍗曚綅锛�</div>
+            <div class="search_input">
+              <el-select v-model="addInfo.sampleSupplier" size="small">
+                <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
+                           :key="item.id"></el-option>
+              </el-select>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鐣欐牱鏃ユ湡锛�</div>
+            <div class="search_input">
+              <el-date-picker v-model="addInfo.leaveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+                              value-format="yyyy-MM-dd" style="width: 100%;">
+              </el-date-picker>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏍峰搧鐘舵�侊細</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+                                                v-model="addInfo.sampleState"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+        <div class="search_thing">
+          <div class="search_label">澶勭悊鏃ユ湡锛�</div>
+          <div class="search_input">
+            <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="閫夋嫨鏃ユ湡" format="yyyy-MM-dd"
+                            value-format="yyyy-MM-dd" style="width: 100%;">
+            </el-date-picker>
+          </div>
+        </div>
+      </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+        <el-button type="primary" @click="submitAdd" :loading="addLoading">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+    <!-- 璇︽儏/涓嬭浇/瀹℃牳/鎵瑰噯 -->
+    <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '涓嬭浇' }"
+               :modal="title0 != '涓嬭浇'" top="5vh">
+      <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
+                   style="max-height: 70vh;overflow-y: auto;" />
+      <span slot="footer" class="dialog-footer" v-if="title0 == '瀹℃牳' || title0 == '鎵瑰噯'">
+        <el-button @click="submitCheck('涓嶉�氳繃')" :loading="noCheckLoading">涓嶉�氳繃</el-button>
+        <el-button type="primary" @click="submitCheck('閫氳繃')" :loading="checkLoading">閫� 杩�</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import filePreview from "@/components/Preview/filePreview.vue";
+import { selectCustomPageList } from "@/api/system/customer";
+import {
+  pageProcessSample,
+  delProcessSample,
+  addProcessSample,
+  exportProcessSample
+} from "@/api/cnas/process/sampleDisposal";
+export default {
+  name: 'SampleReceipt',
+  components: {
+    limsTable,
+    filePreview,
+  },
+  data() {
+    return {
+      activeName: '濉啓',
+      title: '鏂板',
+      addDialogVisible: false,
+      addLoading: false,
+      outLoading: false,
+      editDialogVisible: false,
+      lookDialogVisible: false,
+      title0: '鏌ョ湅',
+      noCheckLoading: false,
+      checkLoading: false,
+      // 鍘嗗彶鍒楄〃
+      addInfo: {},//鏂板鏍峰搧
+      customPageList: [],
+      currentInfo: {
+        arr: []
+      },//鏌ョ湅鐨勮鎯�
+      queryParams0: {
+        receiveDate: ''
+      },
+      tableLoading0: false,
+      tableData0: [],
+      column0: [
+        {
+          label: "鏀舵牱鏃ユ湡",
+          prop: "receiveDate",
+        },
+        {
+          label: "鏍峰搧缂栧彿",
+          prop: "sampleCode",
+        },
+        {
+          label: "鏍峰搧鍚嶇О",
+          prop: "sampleName",
+        },
+        {
+          label: "鏍峰搧鏁伴噺",
+          prop: "num",
+        },
+        {
+          label: "鏉ユ牱鍗曚綅",
+          prop: "sampleSupplier",
+        },
+        {
+          label: "鐣欐牱鏃ユ湡",
+          prop: "leaveDate",
+        },
+        {
+          label: "鏍峰搧鐘舵��",
+          prop: "sampleState",
+        },
+        {
+          label: "閫�鏍风鏀�/澶勭悊鏃ユ湡",
+          prop: "dealTime",
+        },
+        {
+          dataType: "slot",
+          slot: "action",
+          label: "鎿嶄綔",
+        }
+      ],
+      page0: {
+        total: 0,
+        size: 10,
+        current: 0,
+      },
+    };
+  },
+  mounted() {
+    this.getList0()
+  },
+  methods: {
+    // 鑾峰彇閫佹牱鍗曚綅鍒楄〃
+    getCustomPageList() {
+      selectCustomPageList({
+        current: -1,
+        size: -1
+      }).then(res => {
+        this.customPageList = res.data.records
+      }).catch(err => { });
+    },
+    refresh() {
+      this.queryParams0 = {};
+      this.page0.current = 1;
+      this.getList0();
+    },
+    refreshTable() {
+      this.page0.current = 1;
+      this.getList0();
+    },
+    // 鏌ヨ琛ㄦ牸鏁版嵁
+    getList0() {
+      this.tableLoading0 = true;
+      let param = { ...this.queryParams0, ...this.page0 };
+      delete param.total;
+      pageProcessSample({ ...param })
+        .then((res) => {
+          this.tableLoading0 = false;
+          if (res.code === 200) {
+            this.tableData0 = res.data.records;
+            this.page0.total = res.data.total;
+          }
+        })
+        .catch((err) => {
+          this.tableLoading0 = false;
+        });
+    },
+    pagination0({ page, limit }) {
+      this.page0.current = page;
+      this.page0.size = limit;
+      this.getList0();
+    },
+    // 鎵撳紑缂栬緫寮规
+    handleAdd(row) {
+      this.addInfo = this.HaveJson(row)
+      this.title = '缂栬緫'
+      this.addDialogVisible = true
+      this.getCustomPageList()
+    },
+    delRow(row) {
+      this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          delProcessSample({ id: row.id }).then(res => {
+            if (res.code == 200) {
+              this.$message.success("鍒犻櫎鎴愬姛");
+              this.refreshTable();
+            }
+          }).catch(err => { });
+        })
+        .catch(() => { });
+    },
+    // 鎻愪氦鏂板
+    submitAdd() {
+      // 缂栬緫
+      this.addLoading = true
+      addProcessSample({
+        ...this.addInfo
+      }).then(res => {
+        this.addLoading = false
+        this.addDialogVisible = false
+        this.$message({
+          type: 'success',
+          message: '缂栬緫鎴愬姛!'
+        });
+        this.page0.current = 1;
+        this.refreshTable();
+      }).catch(err => { });
+    },
+    // 瀵煎嚭璇︽儏
+    handleDown0() {
+      exportProcessSample({ receiveDate: this.queryParams0.receiveDate }).then(res => {
+        this.outLoading = false
+        const blob = new Blob([res], { type: 'application/msword' });
+        this.$download.saveAs(blob, '鏍峰搧鎺ユ敹' + '.docx');
+      })
+    },
+  },
+}
+</script>
+
+<style scoped>
+.search_thing {
+  width: 350px;
+  display: flex;
+  align-items: center;
+}
+
+.search_label {
+  width: 110px;
+  font-size: 14px;
+  text-align: right;
+}
+
+.search_input {
+  width: calc(100% - 110px);
+}
+
+.downPdf {
+  opacity: 0 !important;
+}
+
+.tables td {
+  height: 40px;
+  width: 100px;
+  text-align: center;
+  font-size: 14px;
+  word-wrap: break-word;
+  white-space: normal;
+}
+
+.user-info .el-button {
+  margin: 0;
+}
+
+>>>.el-tabs__content {
+  height: 100%;
+}
+</style>

--
Gitblit v1.9.3