Pārlūkot izejas kodu

日志saveAgin按钮

duy 5 mēneši atpakaļ
vecāks
revīzija
e54a6baf1e

+ 69 - 62
src/api/modules/ledger/query.js

@@ -1,45 +1,45 @@
-import { HcApi } from "../../request/index";
+import { HcApi } from '../../request/index'
 
 export default {
     //获取当前合同段下的日志类型
     async queryLogList(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/queryCurrentContractLogList",
-            method: "get",
+            url: '/api/blade-business/contractLog/queryCurrentContractLogList',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //获取当前日志类型的填报人
     async queryFillUser(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/queryFillUser",
-            method: "get",
+            url: '/api/blade-business/contractLog/queryFillUser',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //施工日志分页
     async constructionLogPage(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/constructionLogPage",
-            method: "post",
+            url: '/api/blade-business/contractLog/constructionLogPage',
+            method: 'post',
             data: form,
-        });
+        })
     },
     //批量废除
     async batchAbolish(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/batchAbolish",
-            method: "post",
+            url: '/api/blade-business/contractLog/batchAbolish',
+            method: 'post',
             params: form,
-        });
+        })
     },
     //获取合同段当前日志节点下的填报日期记录
     async getSubmitLogDateList(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/getSubmitLogDateList",
-            method: "post",
+            url: '/api/blade-business/contractLog/getSubmitLogDateList',
+            method: 'post',
             params: form,
-        });
+        })
     },
     //清表生成html
     // async getExcelHtml(form) {
@@ -51,122 +51,129 @@ export default {
     // },
     async getExcelHtml(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/get-excel-html-two",
-            method: "get",
+            url: '/api/blade-manager/exceltab/get-excel-html-two',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //获取表单数据
     async getBussDataInfo(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/get-the-log-business-data",
-            method: "get",
+            url: '/api/blade-manager/exceltab/get-the-log-business-data',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //获取表单数据
     async getTheLogBusinessData(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/get-the-log-business-data",
-            method: "get",
+            url: '/api/blade-manager/exceltab/get-the-log-business-data',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //填报页面数据保存
     async saveExcelBussData(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/save_log_first_buss_data",
-            method: "post",
+            url: '/api/blade-manager/exceltab/save_log_first_buss_data',
+            method: 'post',
             data: form,
-        });
+        })
     },
     //单表pdf预览
     async getBussPdfInfo(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/get-the-log-pdfInfo",
-            method: "get",
+            url: '/api/blade-manager/exceltab/get-the-log-pdfInfo',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //获取当前日志资料关联的工序节点信息
     async queryCurrentLogSelectProcessList(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/queryCurrentLogSelectProcessList",
-            method: "post",
+            url: '/api/blade-business/contractLog/queryCurrentLogSelectProcessList',
+            method: 'post',
             params: form,
-        });
+        })
     },
     //获取当前资料的任务状态
     async checkTheLogTaskStatus(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/checkTheLogTaskStatus",
-            method: "get",
+            url: '/api/blade-business/contractLog/checkTheLogTaskStatus',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //预览、打印
     async theLogPreviewAndPrint(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/theLogPreviewAndPrint",
-            method: "post",
+            url: '/api/blade-business/contractLog/theLogPreviewAndPrint',
+            method: 'post',
             data: form,
-        });
+        })
     },
     //废除
     async theLogOneAbolish(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/oneAbolish",
-            method: "get",
+            url: '/api/blade-business/contractLog/oneAbolish',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //删除
     async theLogRemoveByIds(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/removeByIds",
-            method: "post",
+            url: '/api/blade-business/contractLog/removeByIds',
+            method: 'post',
             data: form,
-        });
+        })
     },
     //获取当前合同段下本日志节点的填报资料日期树
     async queryReportLogTimeTree(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/queryReportLogTimeTree",
-            method: "get",
+            url: '/api/blade-business/contractLog/queryReportLogTimeTree',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //获取填报记录
     async queryLogTimeTreeList(form) {
         return HcApi({
-            url: "/api/blade-business/contractLog/queryLogList",
-            method: "get",
+            url: '/api/blade-business/contractLog/queryLogList',
+            method: 'get',
             params: form,
-        });
+        })
     },
     //复制任意时间
     async copyTheLogBusinessData(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/copy-the-log-business-data",
-            method: "get",
+            url: '/api/blade-manager/exceltab/copy-the-log-business-data',
+            method: 'get',
             params: form,
-        });
+        })
     },
 
     //1、删除施工日志对应的表数据记录信息接口POST:/api/blade-manager/exceltab/removeLogTab
     async removeLogTab(form) {
         return HcApi({
-            url: "/api/blade-manager/exceltab/removeLogTab",
-            method: "post",
+            url: '/api/blade-manager/exceltab/removeLogTab',
+            method: 'post',
             params: form,
-        });
+        })
     },
     //日志列表一键重签
     async logReSigningEVisa(form) {
         return HcApi({
-            url: "/api/blade-business/task/logReSigningEVisa",
-            method: "post",
+            url: '/api/blade-business/task/logReSigningEVisa',
+            method: 'post',
             data: form,
-        });
+        })
     },
-};
+    async logSaveAgain(form) {
+        return HcApi({
+            url: '/api/blade-business/task/logSaveAgain',
+            method: 'post',
+            data: form,
+        })
+    },
+}

+ 51 - 0
src/views/ledger/components/table-list.vue

@@ -76,6 +76,15 @@
                 >
                     re-sign
                 </el-button>
+                <el-button
+                    :disabled="tableCheckedKeys.length <= 0"
+                    :loading="saveAgainLoading"
+                    hc-btn
+                    type="primary"
+                    @click="saveAgainClick"
+                >
+                    save-again
+                </el-button>
             </template>
             <HcTable
                 ref="tableListRef"
@@ -501,6 +510,48 @@ const resignClick = async () => {
     }
     resignModal.value = true
 }
+//SaveAgin
+const saveAgainLoading = ref(false)
+const saveAgainClick = async () => {
+    const rows = tableCheckedKeys.value 
+    if (rows.length <= 0) {
+        window.$message?.warning('请先勾选已审批的数据')
+        return
+    } 
+    //获取任务id
+    const taskIds = arrToKey(rows, 'id')
+    const idsArr = taskIds.split(',')
+    let isCan = idsArr.some((ele) => ele === '' || ele == -1)
+    if (isCan) {
+        window.$message?.warning('参数异常,暂不支持该操作')
+        return
+    }
+    //发起请求
+    saveAgainLoading.value = true
+    const { primaryKeyId } = menuItem.value
+    const { excelId } = menuItem.value
+    excelIdVal.value = excelId > 0 ? excelId + '' : ''
+    const { error, code, msg } = await queryApi.logSaveAgain({
+        nodePrimaryKeyId: primaryKeyId,
+        logPkeyId: excelIdVal.value,
+        logIds: taskIds,
+        contractId: contractId.value,
+    })
+    //处理数据
+    saveAgainLoading.value = false
+
+    if (!error && code === 200) {
+        window.$message?.success(
+            msg ?? '提交成功,请请耐心等待重签,可继续操作其它的功能。',
+        )
+        getTableData().then()
+    } else {
+        window.$message?.error(msg ?? '操作失败')
+    }
+  
+}
+
+
 const excelIdVal = ref('')
 const signClick = async () => {
     const rows = tableCheckedKeys.value