소스 검색

撤回上报流程方法

duy 2 년 전
부모
커밋
e74b46b510
1개의 변경된 파일26개의 추가작업 그리고 2개의 파일을 삭제
  1. 26 2
      src/views/tentative/detect/test-form.vue

+ 26 - 2
src/views/tentative/detect/test-form.vue

@@ -642,11 +642,35 @@ const bussPdfsClick = async () => {
     }
 }
 
+//撤回上报流程
+// const abolishOneClick = () => {
+//     window.$message?.warning('暂无接口')
+// }
 //撤回上报流程
 const abolishOneClick = () => {
-    window.$message?.warning('暂无接口')
+    window?.$messageBox?.alert('请谨慎考虑后,是否确定撤回?', '撤回上报', {
+        showCancelButton: true,
+        confirmButtonText: '确定撤回',
+        cancelButtonText: '取消',
+        callback: (action) => {
+            if (action === 'confirm') {
+                abolishOneSave()
+            }
+        }
+    })
+}
+//撤回请求
+const abolishOneSave = async () => {
+    const info = getStoreData('prenodeDataInfo') || {}
+    const {error, code} = await wbsApi.abolishOne({
+        primaryKeyId:  info?.primaryKeyId || '',
+        classify: authBtnTabKey.value
+    })
+    if (!error && code === 200) {
+        window.$message?.success('撤回成功')
+        getTableDataAll()
+    }
 }
-
 //返回
 const toBackClick = () => {
     router.push({