Ver Fonte

验收申请修改

duy há 1 ano atrás
pai
commit
a8ef76a7b9

+ 24 - 1
src/api/modules/initial/initial.js

@@ -17,5 +17,28 @@ export default {
             data: form,
         }, msg)
      },
- 
+     //查看申请状态
+     async getApplyStatus(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/getApplyStatus',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //撤销申请
+    async annulApply(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/annulApply',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //在线验收-根据单位显示档案
+    async getUnitArchivesAutoView(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/getUnitArchivesAutoView',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
 }

+ 9 - 1
src/views/transfer/components/table-classify.vue

@@ -1,9 +1,17 @@
 <template>
     <hc-new-card>
         <template #header>
-            <HcNewSwitch :datas="tabData" :keys="tabKey" :round="false" @change="tabChange" />
+            <!-- <HcNewSwitch :datas="tabData" :keys="tabKey" :round="false" @change="tabChange" /> -->
         </template>
         <template #extra>
+            <el-button hc-btn color="#626aef">
+                <HcIcon name="eye" />
+                <span>历史验收报告</span>
+            </el-button>
+            <el-button hc-btn class=" m-1" type="warning">
+                <HcIcon name="eye" />
+                <span>历史整改报告</span>
+            </el-button>
             <HcTooltip keys="file_collection_btn_upload_scanned_files">
                 <el-button type="primary" hc-btn>
                     <HcIcon name="git-pull-request" />

+ 75 - 20
src/views/transfer/components/table-collect.vue

@@ -1,33 +1,45 @@
 <template>
     <hc-new-card scrollbar>
-        <template #header>
-            <HcNewSwitch :datas="tabData" :keys="tabKey" :round="false" @change="tabChange" />
-        </template>
+        <template #header />
         <template #extra>
+            <!-- <HcNewSwitch :datas="tabData" :keys="tabKey" :round="false" @change="tabChange" /> -->
+            <el-button hc-btn color="#626aef">
+                <HcIcon name="eye" />
+                <span>历史验收报告</span>
+            </el-button>
+            <el-button hc-btn class=" m-1" type="warning">
+                <HcIcon name="eye" />
+                <span>历史整改报告</span>
+            </el-button>
             <HcTooltip keys="file_collection_btn_upload_scanned_files">
-                <el-button type="primary" hc-btn @click="reportModalClick">
+                <el-button v-if="!showBtn" type="primary" hc-btn @click="reportModalClick">
                     <HcIcon name="git-pull-request" />
                     <span>申请验收</span>
                 </el-button>
+                <el-button v-else type="primary" hc-btn @click="cancelClick">
+                    <HcIcon name="git-pull-request" />
+                    <span>撤回验收申请</span>
+                </el-button>
             </HcTooltip>
         </template>
         <div v-loading="totalLoaing" class="h-screen">
             <div v-for="(item, index) in totalData" :key="index">
                 <div class="hc-card-table-title">{{ item.unitInfo }}</div>
-                <HcCardItem v-for="(item1, index1) in item.nodeLists" :key="index1" ui="h-half">
-                    <template #header>
-                        <span>{{ item1.nodeInfo }}</span>
-                    <!-- <span class="text-gray">(238卷)</span> -->
-                    </template>
-               
-                    <HcTable
-                        v-if="item1.list !== null"
-                        ref="tableRef" :column="tableColumn" :datas="item1.list" :loading="tableLoading"
-                        is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
-                        heights="300px"
-                        @selection-change="tableSelection"
-                    />
-                </HcCardItem>
+                <template v-for="(item1, index1) in item.nodeLists" :key="index1">
+                    <HcCardItem v-if="item1.list !== null" ui="h-half">
+                        <template #header>
+                            <span>{{ item1.nodeInfo }}</span>
+                            <!-- <span class="text-gray">(238卷)</span> -->
+                        </template>
+                        <div :style="`height: ${item1.list !== null ? '300px' : 'auto'};`">
+                            <HcTable
+                                ref="tableRef" :column="tableColumn" :datas="item1.list" :loading="tableLoading"
+                                is-new :index-style="{ width: 60 }" is-check :check-style="{ width: 29 }"
+                                @selection-change="tableSelection"
+                            />
+                        </div>
+                    </HcCardItem>
+                </template>
             </div>
         </div>
     </hc-new-card>
@@ -85,8 +97,26 @@ watch(() => [
 
 //渲染完成
 onMounted(() => {
+
+    getBtnstatus()
     getTotalData()
 })
+//查看验收申请状态
+const showBtn = ref(true)
+const getBtnstatus = async ()=>{
+    totalLoaing.value = true
+    const { error, code, data } = await initialgApi.getApplyStatus({
+        projectId: projectId.value,
+    })
+    totalLoaing.value = false
+    if (!error && code === 200) {
+        console.log(data, 'data')
+        showBtn.value = data
+    } else {
+        showBtn.value = true
+     
+    }
+}
 const totalData = ref([])
 const totalLoaing = ref(false)
 const getTotalData = async ()=>{
@@ -253,9 +283,34 @@ const reportTaskTagClose = (index) => {
 }
 
 //上报完成
-const showReportFinish = () => {
+const showReportFinish = async () => {
     showReportModal.value = false
-    //getTableData()
+    tableKeys.value = []
+    await getBtnstatus()
+    getTotalData()
+}
+//撤回验收申请
+const cancelClick = ()=>{
+    window?.$messageBox?.alert('确认撤销? 撤销之后专家账号也一并清空删除', '提示', {
+        showCancelButton: true,
+        confirmButtonText: '确认撤销',
+        cancelButtonText: '取消',
+        callback: async (action, ctx ) => {
+            if (action === 'confirm') {
+                ctx.confirmButtonLoading = true
+                const { code, msg, error } = await initialgApi.annulApply({
+                    projectId:projectId.value,
+                })
+                ctx.confirmButtonLoading = true
+                if (!error && code === 200) {
+                    window.$message?.success(msg)
+                    getBtnstatus()
+                    getTotalData()
+                  
+                }
+            }
+        },
+    })
 }
 </script>