ysy 2 lat temu
rodzic
commit
105ec35dde

+ 9 - 9
src/views/outsourcing/components/details.vue

@@ -3,11 +3,11 @@
         :close-on-press-escape="false" append-to-body width="80%">
         :close-on-press-escape="false" append-to-body width="80%">
 
 
         <!-- 数据表格 -->
         <!-- 数据表格 -->
-        <ele-pro-table ref="table" :columns="columns"  cache-key="detailsTable">
+        <ele-pro-table ref="table" :columns="columns" cache-key="detailsTable" height="calc(100vh - 350px)">
 
 
             <template v-slot:totalCount="{ row }">
             <template v-slot:totalCount="{ row }">
-                     {{ row.totalCount }}{{ row.measuringUnit }}
-                </template>
+                {{ row.totalCount }}{{ row.measuringUnit }}
+            </template>
 
 
         </ele-pro-table>
         </ele-pro-table>
 
 
@@ -84,9 +84,9 @@ export default {
                 },
                 },
 
 
 
 
-      
 
 
-     
+
+
 
 
 
 
 
 
@@ -111,9 +111,9 @@ export default {
             this.$nextTick(() => {
             this.$nextTick(() => {
                 this.$refs.table.setData([...row.detailList]);
                 this.$refs.table.setData([...row.detailList]);
             })
             })
-        
-       
-          
+
+
+
 
 
         },
         },
 
 
@@ -127,7 +127,7 @@ export default {
             this.visible = false
             this.visible = false
 
 
 
 
-       
+
         },
         },
 
 
     }
     }

+ 27 - 6
src/views/outsourcing/index.vue

@@ -11,6 +11,17 @@
                     <el-tag>{{ row.isRelease == 1 ? '已发布' : '未发布' }}</el-tag>
                     <el-tag>{{ row.isRelease == 1 ? '已发布' : '未发布' }}</el-tag>
                 </template>
                 </template>
 
 
+
+                <template v-slot:bomArtFiles="{ row }">
+
+                    <div v-if="row.bomArtFiles && row.bomArtFiles?.length">
+                        <el-link v-for="link in row.bomArtFiles" :key="link.id" type="primary" :underline="false"
+                            @click="downloadFile(link)">
+                            {{ link.name }}</el-link>
+                    </div>
+
+                </template>
+
                 <template v-slot:action="{ row }">
                 <template v-slot:action="{ row }">
                     <el-link type="primary" :underline="false" @click="handleFlow(row)">
                     <el-link type="primary" :underline="false" @click="handleFlow(row)">
                         流程
                         流程
@@ -48,6 +59,7 @@ import flow from './components/flow.vue'
 import search from './components/search.vue';
 import search from './components/search.vue';
 import release from './components/release.vue'
 import release from './components/release.vue'
 import Detail from './components/details.vue';
 import Detail from './components/details.vue';
+import { getFile } from "@/api/system/file";
 export default {
 export default {
     components: {
     components: {
         search,
         search,
@@ -132,8 +144,7 @@ export default {
                     prop: 'expectReceiveDate',
                     prop: 'expectReceiveDate',
                     label: '预计到货日期',
                     label: '预计到货日期',
                     align: 'center',
                     align: 'center',
-                    showOverflowTooltip: true,
-                    minWidth: 110
+                    minWidth: 70
                 },
                 },
 
 
 
 
@@ -141,8 +152,7 @@ export default {
                     prop: 'createTime',
                     prop: 'createTime',
                     label: '创建时间',
                     label: '创建时间',
                     align: 'center',
                     align: 'center',
-                    showOverflowTooltip: true,
-                    minWidth: 110
+                    minWidth: 70
                 },
                 },
 
 
                 {
                 {
@@ -152,6 +162,13 @@ export default {
                 },
                 },
 
 
 
 
+                {
+                    label: '附件',
+                    slot: 'bomArtFiles',
+                    action: 'bomArtFiles',
+                    minWidth: 100,
+                },
+
 
 
                 {
                 {
                     columnKey: 'action',
                     columnKey: 'action',
@@ -194,6 +211,10 @@ export default {
             });
             });
         },
         },
 
 
+        downloadFile(file) {
+            getFile({ objectName: file.storePath }, file.name);
+        },
+
 
 
         handleFlow(row) {
         handleFlow(row) {
             this.$refs.flowRef.open(row.processInstanceId);
             this.$refs.flowRef.open(row.processInstanceId);
@@ -203,10 +224,10 @@ export default {
         handleDetails(row) {
         handleDetails(row) {
 
 
 
 
-            if(this.clientEnvironmentId == 3) {
+            if (this.clientEnvironmentId == 3) {
                 this.$refs.detailsRef.open(row)
                 this.$refs.detailsRef.open(row)
             }
             }
-           
+
         },
         },