Ver Fonte

预览id修改

duy há 2 anos atrás
pai
commit
cba1fc017d

+ 63 - 6
src/views/tentative/detect/test-form.vue

@@ -125,7 +125,10 @@
                 </div>
             </div>
         </HcDialog>
-
+        
+        <!--批量上报审批-->
+        <HcReportModal  title="批量上报审批" url="informationWriteQuery/taskOne" :show="showReportModal" :projectId="projectId" :contractId="contractId" type="wbs" :typeData="reportTypeData"
+        :taskName="reportTaskName" :ids="reportIds" :addition="reportAddition" @hide="showReportModal = false" @finish="showReportFinish"/>
     </div>
 </template>
 
@@ -145,6 +148,7 @@ import {getDictionary} from "~api/other";
 import {rowsToId} from "~uti/tools";
 import dayjs from "dayjs"
 import { Loading } from "element-plus/es/components/loading/src/service";
+import { eVisaTaskCheckApi} from "~api/other"
 
 
 //变量
@@ -533,13 +537,66 @@ const setFormRegExpJson = (FormRegExpJson) => {
         }
     })
 }
-
-//上报数据
+//获取数据列表
+const ListItemDatas = ref([]);
+const nodeItemInfo = ref({})
+const nodeDataInfo = ref({})
+//批量上报
+const reportIds = ref('')
+const reportTaskName = ref('')
+const reportAddition = ref({})
+const showReportModal = ref(false)
 const reportLoading = ref(false)
-const reportModalClick = async () => {
-    window.$message?.warning('暂无接口')
+const reportTypeData = ref([])
+
+// const reportModalClick = async () => {
+//      showReportModal.value = true
+// }
+
+//上报完成
+const showReportFinish = () => {
+    showReportModal.value = false
+    getTableDataAll()
 }
 
+
+const reportModalClick = async () => {
+      
+    const info = getStoreData('prenodeDataInfo') || {}
+    console.log(info,'info');
+    const rows = listItemData.value;
+    if (rows.length > 0) {
+        reportLoading.value = true
+        const taskCheck = await eVisaTaskCheckApi({
+            projectId: projectId.value,
+            contractId: contractId.value
+        })
+        //处理数据
+        let newArr = [];
+        for (let i = 0; i < rows.length; i++) {
+            newArr.push(rows[i]['isTypePrivatePid'])
+        }
+        reportTypeData.value = newArr
+        reportLoading.value = false
+        if (taskCheck) {
+            //初始弹出弹窗,防呆
+            reportIds.value = info['primaryKeyId']
+            reportAddition.value = {
+                classify: authBtnTabKey.value,
+                contractIdRelation: info['contractIdRelation'],
+            }
+            showReportModal.value = true
+            //请求文件题名
+            const {data} = await wbsApi.queryDocumentTitle({
+                primaryKeyId: info['primaryKeyId'],
+                classify: authBtnTabKey.value
+            })
+            reportTaskName.value = isString(data)? data : ''
+        }
+    } else {
+        window.$message?.warning('暂无相关数据')
+    }
+}
 //多表预览
 const bussPdfsLoading = ref(false)
 const bussPdfsClick = async () => {
@@ -549,7 +606,7 @@ const bussPdfsClick = async () => {
         contractId: contractId.value,
         classify: authBtnTabKey.value,
         tableType: tabTypeKey.value,
-        nodeId: nodeId,
+        nodeId: router.currentRoute.value.query.id,
     })
     bussPdfsLoading.value = false
     if (!error && code === 200) {

+ 5 - 1
src/views/tentative/detect/test.vue

@@ -367,12 +367,16 @@ const addFormModalClick = () => {
 //编辑
 const tableRowEdit = (row) => {
     setStoreData('test-form', row)
+    setStoreData('prenodeDataInfo', nodeDataInfo.value)
+    console.log(JSON.stringify(nodeDataInfo.value),'JSON.stringify(nodeDataInfo.value)');
     router.push({
         path: '/tentative/detect/test-form',
         query: {
             id: row.id,
             nodeId: row.nodeId,
-            dataType: row.type
+            dataType: row.type,
+            // prenodeDataInfo:JSON.stringify(nodeDataInfo.value)
+
         }
     })
 }