浏览代码

抽检修改

duy 3 周之前
父节点
当前提交
32fc76eff5

+ 17 - 11
src/views/archives/manage/inspects.vue

@@ -324,16 +324,16 @@ const tableRowClick = async ({ row }) => {
     // checkId.value = ''
 
 
-    // const url = await viewPdf(row.id)
-    //     pdfUrl.value = url
-    //     if (pdfUrl.value && pdfUrl?.value.length > 0 && isCarrySpotChecksDrawer.value) {
-    //         setTimeout(() => {
-    //             if (isCarrySpotChecksDrawer.value) {
-    //                 serReviewFile()
-    //             }
-
-    //         }, 30000)
-    //     }
+    const url = await viewPdf(row.id)
+        pdfUrl.value = url
+        if (pdfUrl.value && pdfUrl?.value.length > 0 && isCarrySpotChecksDrawer.value) {
+            setTimeout(() => {
+                if (isCarrySpotChecksDrawer.value) {
+                    serReviewFile()
+                }
+
+            }, 30000)
+        }
 }
 //获取卷内文件数据
 const getArchiveFileListData = async ()=>{
@@ -372,13 +372,19 @@ const serReviewFile = async ()=>{
             const { error, code, data, msg } = await inspectApi.setreview({
                 id: fileInfo.value.id,
             })
+                if (!error && code === 200) {
+                window.$message.success('当前文件已抽检')
+                
+                } else {
+                    window.$message.error(msg)
+                }
 }
 const checkId = ref('')
 const pdfUrl = ref('')
 const isshowPdf = ref(true)
 const pdfLoading = ref(false)
 const changePdf = (row)=>{
-    console.log(row, 'row')
+    console.log(row, 'row111111')
     ishowFile.value = true
     pdfLoading.value = false
     isshowPdf.value = false

+ 7 - 1
src/views/transfer/components/carry-spot-checks.vue

@@ -381,7 +381,7 @@ const changePdf = (row) => {
                 serReviewFile()
             }
 
-        }, 10000)
+        }, 30000)
     }
 
 
@@ -393,6 +393,12 @@ const serReviewFile = async () => {
         projectId: projectId.value,
         conclusionId: currentId.value,
     })
+    if (!error && code === 200) {
+    window.$message.success('当前文件已抽检')
+     
+    } else {
+          window.$message.error(msg)
+    }
 }
 const opid = ref('')
 

+ 4 - 5
src/views/transfer/preliminary-examination.vue

@@ -65,12 +65,11 @@
                         :column="tableColumn" :datas="tableData" :loading="tableLoading"
                         is-new :index-style="{ width: 60 }"
                     >
-                        <template #key4="{ row, index }">
-                            <span :style="row.key4_1 === '1' ? 'color: #81b337' : ''">{{ row.key4 }}</span>
-                        </template>
-                        <template #key5="{ row, index }">
-                            <span :style="row.key5_1 === '1' ? 'color: #81b337' : 'color: #bd3124'">{{ row.key5 }}</span>
+                        <template #inspectStatusName="{ row, index }">
+                            <el-tag v-if="row.inspectStatusName === '已抽检'" type="success" effect="dark">{{ row.inspectStatusName }}</el-tag>
+                            <el-tag v-else type="info" effect="dark">{{ row.inspectStatusName }}</el-tag>
                         </template>
+                   
                         <template #action="{ row, index }">
                             <el-button size="small" type="primary" @click="tableClick(row)">查看</el-button>
                         </template>