From 1997d52296ee89f4b7833c19e2e37ea2b5408e22 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 26 三月 2025 10:12:51 +0800
Subject: [PATCH] Merge branch 'radio-frequency-cable' of http://114.132.189.42:9002/r/lims-ruoyi-before into radio-frequency-cable

---
 src/api/structural/workshop.js                         |    9 +++
 src/views/business/materialOrder/customsInspection.vue |   18 +++++
 src/views/business/materialOrder/commom/fileList.vue   |  116 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 142 insertions(+), 1 deletions(-)

diff --git a/src/api/structural/workshop.js b/src/api/structural/workshop.js
index c32d07c..a3b3667 100644
--- a/src/api/structural/workshop.js
+++ b/src/api/structural/workshop.js
@@ -36,6 +36,15 @@
   });
 }
 
+//鑾峰彇瀵硅薄闆朵欢鍙烽檮浠跺垪琛�
+export function partFileList(query) {
+  return request({
+    url: '/workShop/partFileList',
+    method: 'get',
+    params: query
+  })
+}
+
 // 鍒犻櫎鏂囦欢
 export function delFile(query) {
   return request({
diff --git a/src/views/business/materialOrder/commom/fileList.vue b/src/views/business/materialOrder/commom/fileList.vue
new file mode 100644
index 0000000..378cf0e
--- /dev/null
+++ b/src/views/business/materialOrder/commom/fileList.vue
@@ -0,0 +1,116 @@
+<template>
+    <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="fileDialogVisible" width="800px" top="5vh" fullscreen append-to-body
+      @close="handleClose">
+      <filePreview v-if="lookDialogVisible" :fileUrl="currentInfo.fileMinioUrl" :currentFile="currentInfo"
+        style="max-height: 90vh;overflow-y: auto;" />
+    </el-dialog>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import partFileList from "@/api/structural/workshop.js"
+import filePreview from "@/components/Preview/filePreview.vue";
+export default {
+  components: {
+    limsTable,
+    filePreview,
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    partNo: {
+      type: String,
+      default: ''
+    }
+  },
+  computed: {},
+  data() {
+    return {
+      columnFile: [
+        {
+          dataType: 'tag',
+          label: '绫诲瀷',
+          prop: 'type',
+          formatData: (params) => {
+            if (params == 1) {
+              return '鍥剧墖'
+            } else if (params == 2) {
+              return '鏂囦欢'
+            } else {
+              return ''
+            }
+          },
+          formatType: (params) => {
+            if (params == 1) {
+              return 'success'
+            } else if (params == 2) {
+              return 'warning'
+            } else {
+              return ''
+            }
+          }
+        },
+        { label: '闄勪欢鍚嶇О', prop: 'fileName' },
+        { label: '涓婁紶浜�', prop: 'name' },
+        { label: '涓婁紶鏃堕棿', prop: 'createTime' },
+        {
+          dataType: 'action',
+          fixed: 'right',
+          label: '鎿嶄綔',
+          width: '170px',
+          operation: [
+            {
+              name: '涓嬭浇',
+              type: 'text',
+              clickFun: (row) => {
+                this.handleDown(row);
+              }
+            },
+            {
+              name: '棰勮',
+              type: 'text',
+              clickFun: (row) => {
+                console.log('棰勮鏂囦欢淇℃伅:', row)
+                this.currentInfo = row
+                this.lookDialogVisible = true
+              }
+            },
+          ]
+        }
+      ],
+      tableDataFile: [],
+      tableLoadingFile: false,
+      lookDialogVisible: false,
+      currentInfo: {},
+      fileDialogVisible: false,
+    }
+  },
+  mounted() {
+    this.getFileList()
+  },
+  methods: {
+    // 鏌ヨ闄勪欢鏌ョ湅鍒楄〃鍥炶皟
+    getFileList() {
+      this.tableLoadingFile = true
+      partFileList({ partNo: this.partNo }).then(res => {
+        this.tableLoadingFile = false
+        if (res.code === 200) {
+          this.tableDataFile = res.data
+          console.log('鏂囦欢鍒楄〃鏁版嵁:', this.tableDataFile)
+        }
+      }).catch(err => {
+        this.tableLoadingFile = false
+      })
+    },
+
+    // 涓嬭浇闄勪欢鐨勬枃浠�
+    handleDown(row) {
+      this.$download.saveAs(row.fileUrl, row.fileName);
+    },
+  }
+}
+</script>
+
+<style scoped></style>
\ No newline at end of file
diff --git a/src/views/business/materialOrder/customsInspection.vue b/src/views/business/materialOrder/customsInspection.vue
index 396f104..d2a77d3 100644
--- a/src/views/business/materialOrder/customsInspection.vue
+++ b/src/views/business/materialOrder/customsInspection.vue
@@ -162,6 +162,15 @@
                 </el-option>
               </el-select>
             </el-form-item>
+            <el-form-item label="闄勪欢鏌ョ湅:" style="margin-bottom: 6px;margin-top: 6px">
+              <el-button type="text" @click="handleFileDialog">
+                <i class="el-icon-document"></i>
+                闄勪欢鏌ョ湅
+              </el-button>
+              <el-dialog :visible.sync="fileDialogVisible" title="闄勪欢鏌ョ湅" width="80%">
+                <fileList :currentNo="partNo" v-if="fileDialogVisible" />
+              </el-dialog>
+            </el-form-item>
           </el-form>
         </div>
         <div style="margin-bottom: 6px;margin-top: 6px">
@@ -410,16 +419,19 @@
   selectStandardProductList,
   selectStandardTreeListByPartNo
 } from "@/api/business/rawMaterialOrder";
+import fileList from "./commom/fileList.vue"
+import limsTable from "@/components/Table/lims-table.vue";
 
 export default {
   name: "CustomsInspection",
   dicts: ['check_type', 'urgency_level'],
-  components: {},
+  components: { limsTable,fileList },
   props: {
   },
   data() {
     return {
       customsInspection: {},
+      fileDialogVisible: false,
       orderType: '',
       active: 0,
       currentId: 0,
@@ -618,6 +630,10 @@
   //   this.getInfo() // 鑾峰彇鏁版嵁
   // },
   methods: {
+    handleFileDialog() {
+      this.fileDialogVisible = true
+      this.currentNo = addObj.partNo || customsInspection.partNo;
+    },
     save1() {
       if (this.bsm1DiaList.length > 0) {
         this.bsm1DiaList.forEach(item => {

--
Gitblit v1.9.3